Re: Collecting variables from Hash

2012-01-23 Thread Igor Dovgiy
Hi Pradeep, use List::Util qw( sum ); use constant { SUFFICIENT_SUCCESS => 244 } ... my $success = sum( map { /success$/ ? $results_href->{$_} : () } keys %$results_href ); ... return $success == SUFFICIENT_SUCCESS; -- iD 2012/1/22 Pradeep Patra > Hi, > I have a hash reference as follows:

Collecting variables from Hash

2012-01-22 Thread Pradeep Patra
Hi, I have a hash reference as follows: $VAR1 = { A.processor0.error => 0 A.processor0.success => 77 A.processor0.total=> 77 A.processor1.error=> 0 A.processor1.success => 57 A.processor1.total=> 57 A.processor2.error=>