Nearly there, as far as I can see
foreach my $keyLOOK(keys %UnNum){ foreach my $word(@midWords){ if $word == $keyLOOK { $UnNum{$keyLOOK}++; } } }
Or, alternatively..
foreach(keys %UnNum){ foreach my $word(@midWords){ if $word eq $_ { $UnNum{$_}++; } } }
In reply to Re: Counting instances in a hash from an array
by Melly
in thread Counting instances in a hash from an array
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |