in reply to Hash merging!
$A = \%a; creates a reference to the hash %a. References are akin to c pointers, but I'd recommend the tutorials and super search for more.
@$A{keys %b} = values %b; sets the list of (keys %b) equal to the list of (values %b) as hash elements of $A, which is a reference to %a.
You may also be interested in the PLEAC - Merging Hashes codes.
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash merging!
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 |