Friday Perl Challenge

Benjamin Smith bsmith at vtrl.co.uk
Fri Apr 20 10:48:33 BST 2007


On Fri, Apr 20, 2007 at 10:13:24AM +0100, Joel Bernstein wrote:
> perl -nle 'map{$X{$_}++}split/\s+/}{print"$_:$X{$_}"for sort keys%X'

  perl -alne '$h{$_}++for at F}{print"$_:$h{$_}"for sort keys%h'

-- 
Benjamin Smith <bsmith at cabbage.org.uk>


More information about the london.pm mailing list