You could do something like this, but this is still looping:
foreach my $clipnum (keys %file) { $menucount++ if ($file{$clipnum}{FILETYPE} eq "Menu"); $menunvocount++ if ($file{$clipnum}{FILETYPE} eq "Menu" && $file +{$clipnum}{VOICEOVER} eq "No"); $videocount++ if ($file{$clipnum}{FILETYPE} eq "Video"); $nvocount++ if ($file{$clipnum}{VOICEOVER} eq "No" && $file{$cli +pnum}{FILETYPE} eq "Video"); $vocount = $videocount - $nvocount; $menuvocount = $menucount - $menunvocount; }
I know this isn't exactly what you asked, but I believe looping is the only way.
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
In reply to (jjhorner)Keeping a count of matches in a hash that satisfy more than 1 condition
by jjhorner
in thread Keeping a count of matches in a hash that satisfy more than 1 condition
by dmtelf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |