ls -1 | perl -l0 -ne 'print $_, ":"'
works. In the 5.6.1 and 5.8.4 versions of perlrun, the -l switch is documented to auto-chomp only when used with the -n or -p switches. You need both the chomp and a null $\.
In reply to Re: perl one-liner doesn't autochomp input
by keszler
in thread perl one-liner doesn't autochomp input
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |