jerry.hone has asked for the wisdom of the Perl Monks concerning the following question:
which works brilliantly to merge hash b into hash a. What I don't understand is the syntax! Can someone explain what's actually going on here please.%a = ( a => 1, b => 2, c => 3, d => 4, e => 5 ); %b = ( c => 9, d => 16, f => 36 ); $A=\%a; @$A{keys %b} = values %b;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash merging!
by ambrus (Abbot) on Apr 26, 2005 at 08:37 UTC | |
by eibwen (Friar) on Apr 26, 2005 at 08:40 UTC | |
by ambrus (Abbot) on Apr 26, 2005 at 08:57 UTC | |
|
Re: Hash merging!
by inman (Curate) on Apr 26, 2005 at 08:40 UTC | |
|
Re: Hash merging!
by eibwen (Friar) on Apr 26, 2005 at 07:59 UTC | |
by jerry.hone (Initiate) on Apr 26, 2005 at 08:20 UTC | |
by eibwen (Friar) on Apr 26, 2005 at 08:30 UTC | |
by ysth (Canon) on Apr 26, 2005 at 09:09 UTC |