in reply to hash keys compare
Do the parent keys have to match?
Otherwise,
That leaves it up to you to set up the parent keys you want in the match. That's destructive of $hash1.my @unseen = do { delete %{$hash1->{$a}{$b}}, keys %{$hash2->{$d}{$e}}; keys %{$hash1->{$a}{$b}}; }
$a and $b are poor choices for variable names. They are sacred to sort and can have side effects.
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: hash keys compare
by Anonymous Monk on Dec 19, 2007 at 13:49 UTC | |
Re^2: hash keys compare
by Anonymous Monk on Dec 19, 2007 at 16:09 UTC |
In Section
Seekers of Perl Wisdom