Re: Odd Perl bitwise-AND & MySQL problem?

Discussion in 'Perl' started by dohnut, Oct 21, 2003.

  1. dohnut

    dohnut Guest

    > While most operators will force their arguments into the numeric or
    > string context that is appropriate to the operator, the bitwise
    > operators will change their own context to fit the arguments.


    Ahh, you know I don't think I knew that. Funny this hasn't affected
    me earlier, though I guess I don't do a lot of bit operations on data
    from databases.

    I guess it was just drilled into my head that perl doesn't have data
    types, so the thought never crossed my mind that it would care that
    the data is actually a string and not an integer. And it doesn't --
    except for bit operations. :p

    Well, thanks, that saved me a lot of fruitless debugging. Obviously
    my follow-up I just made can be disregarded, though, at least the code
    actually 'works' in that one (or doesn't, depending on how you look at
    it). ;)

    -Chris
     
    dohnut, Oct 21, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dohnut
    Replies:
    0
    Views:
    547
    dohnut
    Oct 20, 2003
  2. dohnut
    Replies:
    1
    Views:
    585
    Sam Holden
    Oct 21, 2003
  3. Serve Laurijssen

    odd/even bitwise and

    Serve Laurijssen, Apr 6, 2004, in forum: C Programming
    Replies:
    27
    Views:
    1,224
    Michael Wojcik
    Apr 13, 2004
  4. Michael Speer

    Odd behavior with odd code

    Michael Speer, Feb 16, 2007, in forum: C Programming
    Replies:
    33
    Views:
    1,105
    Richard Heathfield
    Feb 18, 2007
  5. dohnut
    Replies:
    7
    Views:
    132
    Tad McClellan
    Oct 21, 2003
Loading...

Share This Page