Given the variable $foo
containing binary data, how do I get the hexadecimal representation of $foo
in Perl?
views:
62answers:
2
+2
A:
$ perldoc -f hex
…
To present something as hex,
look into "printf", "sprintf", or "unpack".
==>
$hex = sprintf("%x", $foo);
stesch
2010-10-02 18:53:44