Guest User

Untitled

a guest
May 8th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. use warnings;
  2. use strict;
  3.  
  4. my %count;
  5. $count{$_}++ for split //,$ARGV[0];
  6.  
  7. print "$_->{char}: $_->{count}\n" for
  8. sort { $b->{count} <=> $a->{count} }
  9. map { { char => $_, count => $count{$_} } } (keys %count);
Advertisement
Add Comment
Please, Sign In to add comment