Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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?