- or download this
if (exists $hash{$key}) {
if (ref $hash{$key} and ref $hash{$key} eq 'ARRAY') {
...
else {
$hash{$key} = $letters;
}
- or download this
my @pushed = (ref $letters && ref $letters eq 'ARRAY') ? @$letters :
+ $letters;
push @{$hash{$key}}, @pushed;
- or download this
push @{$hash{$key}}, $letters;
- or download this
for $key (keys %found_mod) {
if (@{$found_mod{$key}} > 1) {
print "This key -- $key -- has more than one value!\n";
}
}