Alright, maybe my second ...
while (<>) { push @{$ws_count{+split}}, $_; }
while (($num, $words) = each %ws_count)
{
print "\n----- \#$num -----\n\n";
foreach (@$words) { print; }
}
Though honestly, the first line is the impressive bit, the rest is just nice output formatting
(
Read more... )