in reply to Re: Parsing an Array of Hashes, Modifying Key/Value Pairs
in thread Parsing an Array of Hashes, Modifying Key/Value Pairs
Careful! Without anchors you'll also match on substrings, so better /^$key$/.
Anyway try to avoid regexes when possible and use eq
if ( not grep { $key eq $_ } @keysToKeep) )
Cheers Rolf
( addicted to the Perl Programming Language)
corrected code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Parsing an Array of Hashes, Modifying Key/Value Pairs
by librarat (Novice) on May 12, 2013 at 21:11 UTC |