in reply to adding to hashes
my %C = (%A, %B);
If you were dealing with hash references, you would do:
my $C = { %$A, %$B };
The PDSC is an excellent resource for learning how to grok and manipulate Perl data structures.
Update: As pointed out below by muba and CountZero, you need to keep in mind that hash keys must be unique, and as such any keys in hash A that also exist in hash B will get clobbered.
Cheers,
Darren
|
|---|