say for unpack "d*", $contents; # To print them as you were.