http://www.perlmonks.org?node_id=388977


in reply to perl one-liner doesn't autochomp input

The first effect of using -l is better documented in perlrun
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 /(.*)$/, <>'
HTH

_________
broquaint