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.
In reply to Re: chomp problem
by GrandFather
in thread chomp problem
by piranhas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |