in reply to Handling binary
#!/usr/bin/perl # http://perlmonks.org/?node_id=1141773 use strict; use warnings; print handlingbinary( "139686DA20C1" ), "\n"; sub handlingbinary { return join '', ('A'..'Z')[ map { oct "0b$_" } (unpack 'B*', pack 'H*', shift()) =~ /.{5}/g ] }
Prints:
COLINWRAY
Hi Colin! (Am I right? If not, let me know :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Handling binary
by Anonymous Monk on Sep 12, 2015 at 16:19 UTC | |
by G109B (Initiate) on Sep 14, 2015 at 09:30 UTC |