Just assign the two hashes in the order. Last key wins:
my %result= (%hash1, %hash2);
If you have hash references and want to return a hash reference, just do that. tye's References Quick Reference tells you how to get from a reference to a hash.
In reply to Re: What is the easiest way to merge two hashes?
by Corion
in thread What is the easiest way to merge two hashes?
by tkguifan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |