Or you could have used the function that perl provides for this purpose:$mask = eval '0b' . ( 1 x $bits ) . ( 0 x ( 32 - $bits ) );
$mask = oct '0b' . ( 1 x $bits ) . ( 0 x ( 32 - $bits ) );
In reply to Re: String eval is cool
by jwkrahn
in thread String eval is cool
by DrHyde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |