use strict; my @array = qw/a b c d e f/; my $t = my $hashref = {}; while (@array) { $t = $t->{ shift @array } = @array>1 ? {} : 1 };
In reply to Re: Array to hash refs
by nat0m
in thread Array to hash refs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |