in reply to Can I make a sub for this?
For Q2:
As long as you already have 2 hashs, each keyed by what you would like to match for duplicate, let perl do the work for you.
my $finalHash = { %$hashA, %$hashB };
That dumps $hashA into the finalHash, then dumps $hashB in. Anywhere the keys overlap B will win, otherwise you get all matches from both hashes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can I make a sub for this?
by sandrider (Acolyte) on Aug 23, 2005 at 03:22 UTC |