in reply to packing hex
$hex = pack ( "H*", $a ); $bin = unpack ( "B*", $hex ); print "$bin\n"; [download]