Hey,
Anyone know any tricks to cleanly and concisely merge two hashes into one in Perl?
For example:
my %hash_uno = { a => 1 };
my %hash_dos = { b => 2 };
... do stuff here ...
my %all_hashes = { a => 1, b => 2 };
My first instinct is to do a
keys on each of the original hashes and then push the keys and corresponding values into the merge hash. It seems as though there's gotta be some clever way to slice & dice the data structure so that it's a one or two-liner. . .
Gurus?