in reply to Parsing a hash table for only variables that are uppercase.
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'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing a hash table for only variables that are uppercase.
by RSevrinsky (Scribe) on Mar 25, 2002 at 09:24 UTC |