laziness, impatience, and hubris | |
PerlMonks |
Re: comparing two arrayby si_lence (Deacon) |
on Jun 17, 2009 at 12:36 UTC ( [id://772372]=note: print w/replies, xml ) | Need Help?? |
This is more or less directly from the Perl Cookbook
It passes through the first array remembering all elements in the 'seen' hash, then passes through the second one and only remembers the elements already encountered in the first. It also has a more idomatic version there if you want is more perlish.
cheers si_lence
In Section
Seekers of Perl Wisdom
|
|