In message [EMAIL PROTECTED]
"Ed Mills" [EMAIL PROTECTED] wrote:
Particularly useful for tied hashes using GDBM where the key is actually a
compound key such as 'Tom Smith+Mycity+NY+13404' we could find all NY-ers
using
foreach (keys %h) {if (/\+NY\+/) {$h2{$_}=$h{$_}}
but try
I now you all will kill me for this but here goes..
this is slow:
foreach (keys %h)
{if (/some regex/) {$h2{$_}=$h{$_}}
}
In other words, extract a new hash from an existing one by searching for
primary keys matching a regex. (Please don't get off on your solutions to
this or syntax