[Chicago-talk] appending hashes

Jay Strauss me at heyjay.com
Sun Nov 2 13:25:10 CST 2003

Is there any shortcut (like a slice or something) to push on hash onto

my %h = (a=>1, b=>2, c=>3);
my %a = (d=>4, e=>5);

push %h, %a; #doesn't work
%h += %a; #doesn't work

I did it manually like:
map {$h{$_} = $a{$_}} keys %a;

But, thought there may be a shortcut syntax


More information about the Chicago-talk mailing list