From: Richard Kojedzinszky Date: Fri, 26 Sep 2014 07:43:33 +0000 (+0200) Subject: perl version behaves according to README X-Git-Url: http://git.neszt.hu/?a=commitdiff_plain;h=f4518189be2179201f48e86521a962549ff74532;p=uwc.git perl version behaves according to README --- diff --git a/uwc.pl b/uwc.pl index e6b4176..fa5e1e1 100644 --- a/uwc.pl +++ b/uwc.pl @@ -9,4 +9,4 @@ while () { } } -print join("\n", sort { $counts{$a} <=> $counts{$b} } keys %counts) . "\n"; +print join("\n", map { "$_ $counts{$_}" } sort { $counts{$a} <=> $counts{$b} || $a cmp $b } keys %counts) . "\n";