http://www.perlmonks.org?node_id=11136451


in reply to Problem printing @arrays

Now that you know that you have a windows file, it seems to me that the best solution is to read it the way perl on windows would. (Note: The IO-layer :crlf is the default on windows.)
open my $fh, '<:crlf', 'csw.txt' or die $!; chomp (my @words = <$fh>); close $fh;
Bill