|
|
| The stupid question is the question not asked | |
| PerlMonks |
How do I convert bits into ints?by faq_monk (Initiate) |
| on Oct 08, 1999 at 00:20 UTC ( #580=perlfaq nodetype: print w/ replies, xml ) | Need Help?? |
|
Current Perl documentation can be found at perldoc.perl.org. Here is our local, out-dated (pre-5.6) version:
To turn a string of 1s and 0s like
$decimal = pack('B8', '10110110');
Here's an example of going the other way:
$binary_string = join('', unpack('B*', "\x29"));
|
|