Now the tricky bit is that you can have this merge even when maybe you don't expect it...

For example add this code to the previous lines:

useHashes(%hash1, %hash2);

sub useHashes {

my(%hashInput1, %hashInput2) = @_;

print "hashInput1: " . Dumper(\%hashInput1);

print "hashInput2: " . Dumper(\%hashInput2);

}

What would you expect? Try it out.

What actually happens is that the two hashes are merged inside the call to useHashes(), and all works as if useHashes() received a single argument (the merged hash), instead of two separate arguments (the two original hashes).