in reply to How to Create Hash From this Array
my $hash; $hash = { $_ => $hash } for reverse @array; [download]
my $ref = \$hash; $ref = \$$ref->{$_} for @b; [download]