my @array = qw/ bcd efg hij klm /; my %hash = map { $_, 1 } @array; my $query = 'abc'; if (exists $hash{ $query }) { print "'$query' is in the hash...\n"; }
In reply to Re: does not exist in an array
by trammell
in thread does not exist in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |