When I open the same file in a editor I see CRLF like this:How did you create that file? Did you redirect it? $/ or $INPUT_RECORD_SEPARATOR characters or still there until you
chomp.
If you wish to
remove the CR/LF before the
print then TMTOWTDI. You can
chomp before you print, but then
print "$_\n";. Or you could
s/\r//;.