use strict; use warnings; my %H1 = ( 'THINGS' => ['thing1', 'thing2'], 'PEOPLE' => ['andy', 'margot', 'dave', 'joe'], ); my $thing = 'thing1'; if (grep {$_ eq $thing} @{$H1{'THINGS'}}) { print "found\n"; } else { print "not found\n"; }
In reply to Re: Hash-O-Array Help
by toolic
in thread Hash-O-Array Help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |