http://qs321.pair.com?node_id=691561


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