for (keys %clone_hash) { my $gcnt = (exists $clone_hash{$_}{good}) ? $clone_hash{$_}{good} +: 0; my $bcnt = (exists $clone_hash{$_}{bad} ) ? $clone_hash{$_}{bad} +: 0; print $out "$_\t$gcnt\t$bcnt"; }
Update: removed erroneous "exists"
In reply to Re^5: processing key value pairs of a hash
by toolic
in thread processing key value pairs of a hash
by lomSpace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |