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

Re: Autovivification in perl

by ikegami (Pope)
on Jan 10, 2014 at 20:24 UTC ( #1070186=note: print w/ replies, xml ) Need Help??


in reply to Autovivification in perl

Without autovivification,

$quick[0][3] $ref->{Oxford}{Ram}{Population} $hash{ram}{mohan}{perl}{linux}

would have to be written as follows:

( $quick[0] //= [] )->[3] ((( $ref //= {} )->{Oxford} //= {} )->{Ram} //= {} )->{Population} ((( $hash{ram} //= {} )->{mohan} //= {} )->{perl} //= {} )->{linux}

Which do you prefer?


Comment on Re: Autovivification in perl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-09-17 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls