I am doing a traversing of filesystem and try to autovivificate the hash. The problem - I don't know how to insert multiple keys in hash:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash; my $a="{5}{6}"; # path to insert # trying to get $hash{root}{1}{5}{6}{2}="b"; $hash{root}{1}{$a}{2}="b"; print Dumper(%hash);
but I get $hash{root}{1}{'{5}{6}'}{2}="b". How to get $a interpolated as part of the "path" instead of single key?
Thanks!In reply to Case of autovivification by resistance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |