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;
In reply to Re: On-the-fly hashref
by BrowserUk
in thread On-the-fly hashref
by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |