Gavin (halkeye) wrote in lj_dev,
Gavin
halkeye
lj_dev

Perl Question

Learning as we go has some drawbacks...
Trying to figure out how to tell if a bit is set...
if ( $bitmask |= (1 << $num ) )

it seems to always be true.. so .. need to know if i'm doing it wrong..
its been a while since i've even done it in C...

Any help is welcome

Update: If anyone wants to know, it was
if ($bitmask & $bit ) aka ( $bitmask & (1 << $num) )
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments