in reply to chomp problem

Looks to me like you have a Mac file which uses CR characters as line ends. You need either to remove the chomp or convert the file to Windows line ends CR/LF.

Update: it is well to remember that Perl is line end savy - it does the right thing for the local operating system, which may be the wrong thing if the file is not native.


Perl is Huffman encoded by design.