If all you are trying to do is get a count of the hash elements that have 'yes' values, then:
use strict; use warnings; my %include = ( A => 'yes', B => 'no', C => 'yes', D => 'yes', E => 'no'); my $yes_count = grep /^yes$/, values %include; print "There are $yes_count elements with 'yes'\n";
In reply to Re: Shorten script
by Art_XIV
in thread Shorten scrip
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |