Re: Using unpack for bits



Hi th0ma5_anders0n,

if you must use unpack try these:

on Win32:
perl -e "printf('%04g',unpack("B8",pack('c',6)))" # Ans: 0110

on Ubuntu
perl -e 'printf("%04g\n",unpack("B8",pack("c",6)))' # Ans: 0110

regards.
Timothy