http://www.perlmonks.org?node_id=1001882


in reply to Re^3: Variable as name of array
in thread Variable as name of array

Or even, horrors, a slice:
use Data::Dumper; my @names = qw/ A B C D /; my %order; @order{ @names } = @names; print Dumper \%order; __END__ Prints: $VAR1 = { 'A' => 'A', 'D' => 'D', 'C' => 'C', 'B' => 'B' };
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ