It has two separate effects. First, it automatically chomps $/ (the input record separator) when used with -n or -p.Not taking full advantage of perl's you could always write your one-liner like this
ls -1 | perl -le 'print join ":", map /(.*)$/, <>'
_________
broquaint
In reply to Re: perl one-liner doesn't autochomp input
by broquaint
in thread perl one-liner doesn't autochomp input
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |