$_ = 'a1:a2:a3=foo'; my ($key, $val) = split(/=/); my @keys = split /:/, $key; my %hash; my $href = \%hash; $href = $href->{shift @keys} = (@keys>1) ? {} : $val while @keys; print Dumper(%hash);
In reply to Re: Re: List Values As Multidimensional Hash Keys
by Roy Johnson
in thread List Values As Multidimensional Hash Keys
by joule
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |