"be consistent" | |
PerlMonks |
Re: Chomp in perlby Athanasius (Archbishop) |
on Oct 05, 2014 at 06:12 UTC ( [id://1102852]=note: print w/replies, xml ) | Need Help?? |
Hello sar123, You just need to move the line:
to before the line:
so that the input record separator (which tells Perl what your “lines” are) is in effect when the file is read in. Then the script works as expected:
Output:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|