Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Hash merging!

by eibwen (Friar)
on Apr 26, 2005 at 08:30 UTC ( [id://451453]=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://451453]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2026-01-18 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (122 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.