Looks like your chomp only cut the line feed but not the carriage return out.
Did you change the setting of $/? It should be "\n"?
From chomp:
> This safer version of chop removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Strange behavior with STDIN
by LanX
in thread Strange behavior with STDIN
by slugger415
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |