in reply to Localizing hash keys in an AoH

> I understand why none of these work;

I don't!

Postfix constructs are not supposed to have an own scope, and local is a runtime command.

Looks like a bug to me, or at least a lack of orthogonality.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Update

Apparently are postfix constructs not alike...

🤷🏻

Bust goes the {BLOCK} scope rule....

DB<37> @x{a..c} = 1..3 DB<38> local $x{42} = $y++ for 1 ; say %x c3b2a1 DB<39> local $x{42} = $y++ if 1 ; say %x a14211c3b2 DB<40> say %x a1c3b2 DB<41> local $x = $y++ for 1 ; say $x DB<42> local $x = $y++ if 1 ; say $x 13 DB<43> my $x = $y++ if 1 ; say $x 14 DB<44> my $x = $y++ for 1 ; say $x DB<45>