in reply to variable like $_

Why the aversion for the temporary variable?
for my $foo (keys %var) { for my $bar (keys %{$var{$_}} { # You can access both now. } }
I do not believe that this is any less efficient than using $_, and it has great advantages in flexibility and clarity.