in reply to Array to hash refs
Abigailmy @array = qw /a b c/; my $hash; my $val = 1; ($hash, $hash -> {pop @array}, $val) = (undef, $val, $hash) while @arr +ay > 1; $hash -> {pop @array} = $val;
In Section
Seekers of Perl Wisdom
in reply to Array to hash refs
Abigailmy @array = qw /a b c/; my $hash; my $val = 1; ($hash, $hash -> {pop @array}, $val) = (undef, $val, $hash) while @arr +ay > 1; $hash -> {pop @array} = $val;