in reply to Delete keys in hash if they exist in another hash
foreach $k (keys %hash){ delete ($hash{$k}) unless exists $end{$k}; }
You were using $_ as the key to %end. You have not set $_ in the code you posted so it is unlikely to have a value that you want. This should clear the error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Delete keys in hash if they exist in another hash
by tachyon (Chancellor) on Nov 11, 2004 at 09:49 UTC | |
|
Re^2: Delete keys in hash if they exist in another hash
by tgolf4fun (Novice) on Nov 13, 2004 at 00:20 UTC |