in reply to Looking up a hash by value
You could also build this hash during the file read just as easily and save yourself an extra loop.print "$newm<b>*</b> - ";
my %new_member; foreach (@newest_member) { $new_member{$_} = ''; } then for your loop (which as it looks now has the wrong outer loop goi +ng): foreach (values %whop) { if (exists( $new_member{$_} ) { print "$_<b>*</b> - "; } else { print "$_ - "; } }
|
|---|