in reply to Re^3: Help displaying binary data bit-by-bit in binary notation
in thread Help displaying binary data bit-by-bit in binary notation
The following also works:
my $bin_str = unpack( "b*", $string ); print join( "\n", $bin_str =~ /(.)/g );
It avoids split plus a (magical) regexp when just a regexp will do.
It avoids split // which confuses Text::Balanced.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Help displaying binary data bit-by-bit in binary notation
by japhy (Canon) on Jun 15, 2006 at 03:20 UTC | |
by ikegami (Patriarch) on Jun 15, 2006 at 06:10 UTC |