my %hash; my @path = (5, 6); my $ref = $hash{root}{1} ||= {}; $ref = $$ref{$_} ||= {} for @path; $$ref{2} = "b"; use YAML; print Dump \%hash; __END__ --- root: 1: 5: 6: 2: b
In reply to Re: Case of autovivification
by JavaFan
in thread Case of autovivification
by resistance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |