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

Would you be so kind as to share your favourite one-liners?

Update:
I always use:

perl -e 'print <>' filename

Once we have plenty to chose from, I'll make up a one-liner cheat sheet.

Update2:
I've had a request to ask if you could all explain what the one-liners do as well.

Thanks.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!