in reply to String eval is cool
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 ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: String eval is cool
by ikegami (Patriarch) on Jun 23, 2006 at 14:41 UTC |