Rather than iterating through %whop, you can use reverse to swap the keys and values of a hash, then use exists:
my %whop_value = reverse %whop; foreach my $newm (@newest_members) { $newm .= '<b>*</b>' if exists $whop_value{$newm}; $newm .= ' - '; print $newm; }
Using reverse on hashes is described in perlfunc:reverse
In reply to Re: Re: Looking up a hash by value
by tomhukins
in thread Looking up a hash by value
by tanger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |