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 reply to Re: How to print a newline in oneliners ...
by Anonymous Monk
in thread How to print a newline in oneliners ...
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |