in reply to showascii

If you are going to slurp an entire filehandle into memory, then do it like this:

my $text = do {local $/;<FILE>};
More consise, but also safer in that the undefining of $/ has been tucked away in a 'temporary' scope. But there is no reason to slurp the entire file into memory - you could have just as easily used a while loop to read one line at a time. In fact:
perl -pe 's/(\W)/"(".ord($1).")"/eg' foo.bin
works just as well and is more justified for not using strict. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)