perl -e '$h=pack("H*","139686DA20C1");$b=unpack("B*",$h);print length($b)," $b\n";' #### while( $b ) { print substr($b,0,5,""); }