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


in reply to How-To on Perl one-liners

There was a good article on this in last month's issue of SysAdmin magazine, also by merlyn.