foreach my $hash ( keys %some ) { if ( $#{ $some{$hash} } >= 1 ) { print $#{ $some{$hash} } . "\n"; } }