Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Variable being clobbered by a seemingly unrelated while loop

by choroba (Cardinal)
on Oct 08, 2014 at 11:47 UTC ( [id://1103156]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1103156]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found