Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: How to print a newline in oneliners ...by Anonymous Monk |
on Apr 22, 2014 at 16:35 UTC ( [id://1083196]=note: print w/replies, xml ) | Need Help?? |
I use the -l switch without a value all the time: for i in {0..9}; do echo $i; done | perl -nle '$_++; print'It's the equivalent of $\ = $/ and a chomp on the input.
In Section
Seekers of Perl Wisdom
|
|