Friday Perl Challenge

Chris Jack christopher_jack at hotmail.com
Fri Apr 20 08:24:18 BST 2007


In one line. write a script to read stdin (or variable number of file
arguments) that splits the input into words (non-whitespace consecutive
characters), and outputs, sorted, each unique word and the number of times
it occurs.

 

Bonus marks for not using

1)       cheat mechanisms (such as '||') which fudge the one line
requirement

2)       round brackets

3)       the same perl function more than once



More information about the london.pm mailing list