in reply to Re: Array to hash refs
in thread Array to hash refs

Eval man!
my @array = qw/a b c d/;

my $ref = {};

$code = '$ref->{'.join('}->{', @array).'} = 1;';

eval $code;

use Data::Dumper;
print Dumper($ref);