in reply to alter $/ - but why?
from perlport:
When dealing with binary files (or text files in binary mode) be sure to explicitly set $/ to the appropriate value for your file format before using chomp().
So if your script is accepting files from all different types of OS'es and newlines are not appropriately converted during the transfer, then you're going to have to explicitly set the input record seperator
|
|---|