in reply to Shorten scrip

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";
Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"

Replies are listed 'Best First'.
Re: Re: Shorten script
by Anonymous Monk on May 07, 2004 at 18:01 UTC
    Thanks for ALL your replies!!!