my %hash = (nummer => ['bla', 3], test => ['bla', 1] ); for my $key( sort{$hash{$a}->[1] <=> $hash{$b}->[1]}keys %hash ){ print $key,"\n"; }