Rajiv has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (hashes)
This snippet runs faster than merging. I don't understand how ??foreach $k (sort keys %hash1) { if (exists($hash2{$k})) { $matchWords++; } }
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Union of Two Hashes⭐
by maverick (Curate) on Apr 09, 2002 at 14:35 UTC |