#!/usr/bin/perl use strict; use warnings; my %hash = ( one => [1], two => [ 2, 2 ], three => [ 3, 3, 3 ], ); for ( sort { $hash{$a} <=> $hash{$b} } keys %hash ) { print qq($_\t) . scalar( @{ $hash{$_} } ) . qq(\n); } print qq(\nVariatio delectat.\n);