in reply to On-the-fly hashref
My question is, given the two lists above, how would you create $x without those other temporary variables?
Taking you literally that the values (@data array already exists, just autovivify the hashref:
my $r; @{ $r }{ 1 .. 12 } = @data;
|
|---|