Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: recursively building a hash of arrays of scalars

by choroba (Cardinal)
on Oct 02, 2015 at 08:31 UTC ( [id://1143650]=note: print w/replies, xml ) Need Help??


in reply to Re^2: recursively building a hash of arrays of scalars
in thread recursively building a hash of arrays of scalars

Line 22 is not necessary if you use the more common syntax:
my %testHash; my $hashRef = \%testHash; $hashRef->{a} = "Hello World!"; my $destref = \$hashRef->{b}; # assign a value to the hash element 'a' $$destref->[0] = 'How'; $$destref->[1] = 'are'; $$destref->[2]{'c'} = "you"; $$destref->[2]{'d'} = "today?";
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-28 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found