Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Explaining Autovivication

by pc88mxer (Vicar)
on Jun 11, 2008 at 23:03 UTC ( [id://691561]=note: print w/replies, xml ) Need Help??


in reply to Explaining Autovivication

Wikipedia has a pretty good explanation: Autovivification.

Another example:

$hash->{$x}->{$y} = 1; # with autovivification ( $hash->{$x} ||= {} )->{$y} = 1; # without

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-09-10 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (7 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.