in reply to How to Create Hash From this Array

easy if the hash doesn't exist before:
my $hash; $hash = { $_ => $hash } for reverse @array;
if you don't want to overwrite old values in the hash, it's a bit more complicated, but not much.
my $ref = \$hash; $ref = \$$ref->{$_} for @b;