Don't ask to ask, just ask | |
PerlMonks |
Re: Remove SOME new linesby haukex (Archbishop) |
on Jun 29, 2016 at 09:29 UTC ( [id://1166862]=note: print w/replies, xml ) | Need Help?? |
Hi RenMcCourtey, Is this what you're looking for?
Update: Explanation: When using the -p switch without the -l switch (perlrun), each line read into $_ still contains the newline, which is normally output when the lines are printed back out. So the chomp just chops the newline off, and those lines are printed without the final newline. Hope this helps,
In Section
Seekers of Perl Wisdom
|
|