in reply to Re^2: Variable being clobbered by a seemingly unrelated while loop
in thread Variable being clobbered by a seemingly unrelated while loop

Even lexical variables.
But,
my $x = 3; local $x'
leads to
Can't localize lexical variable $x at 1.pl line 2.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Variable being clobbered by a seemingly unrelated while loop
by tobyink (Canon) on Oct 08, 2014 at 12:33 UTC
Re^4: Variable being clobbered by a seemingly unrelated while loop
by Anonymous Monk on Oct 08, 2014 at 12:15 UTC

    I guess tobyink means:

    my $x='foo'; for $x ('bar') { print "$x\n"; } print "$x\n"; __END__ bar foo