foreach my $key ( grep { /^[A-Z]+$/ } keys %runset ) { print $key, " ", $runset{$key}, "\n"; }
... But if you really wanted to delete the non-uppercase hash elements, then expanding on this usage of grep ...
delete $runset{$_} for ( grep { !/^[A-Z]+$/ } keys %runset );
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
In reply to Re: Parsing a hash table for only variables that are uppercase.
by rob_au
in thread Parsing a hash table for only variables that are uppercase.
by Rhodium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |