Your usage of grep is incorrect. In your first script, use
if ( !grep(/$key/, @keysToKeep) )
to make it work.
In reply to Re: Parsing an Array of Hashes, Modifying Key/Value Pairs
by hdb
in thread Parsing an Array of Hashes, Modifying Key/Value Pairs
by librarat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |