for $key (keys %found_mod) { if (@{$found_mod{$key}} > 1) { print "This key -- $key -- has more than one value!\n"; } }