You will want to take a look at the
pack and
unpack functions and the corresponding tutorial,
Pack/Unpack Tutorial (aka How the System Stores Data), on this site - Another example of
pack/
unpack usage can also be seen in my signature.
rob@development:/home/rob$ perl -e '$str = pack("H*", "9b23b4b322b0da7
+0")'
perl -le "print+unpack'N',pack'B32','00000000000000000000001010100101'"