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;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy