They're both far too verbose.
for my $subhash (@hash{@keyset1}) { print $subhash->{$_} for @keyset2; }
or if you really only have a single statement in there, even print @{$_}{@keyset2} for @hash{@keyset1}; You can be efficient and readable all at the same time.

Makeshifts last the longest.


In reply to Re^3: The Cost of Nested Referencing by Aristotle
in thread The Cost of Nested Referencing by shotgunefx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":