in reply to Convert ASCII string to 7-bit binary string
substr, unpackprint my $out = join '', map {substr unpack('B8'), 1} split //, '4B';
sprintf, ordprint my $out = join '', map {sprintf '%07b', ord} split //, '4B';
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert ASCII string to 7-bit binary string
by Anonymous Monk on Oct 27, 2015 at 20:03 UTC | |
by kennethk (Abbot) on Oct 27, 2015 at 20:21 UTC |