in reply to Re^2: Hash merging!
in thread Hash merging!
my %hash; # the % sigil denotes a hash $hash{'element'} = 1; # the $ sigil denotes a scalar value (the 'eleme +nt' element of %hash)
Similarly, the @ sigil in @$A{keys %b} denotes list context. I believe it interpolates as (verified):
@$A{(c,d,f)} = (9, 16, 36);
Which is essentially the same thing as:
$A{c} = 9; $A{d} = 16; $A{f} = 36;
Given that $A = \%a, you could skip the reference:
$a{c} = 9; $a{d} = 16; $a{f} = 36;
|
|---|