OlegG has asked for the wisdom of the Perl Monks concerning the following question:
Got:use strict; sub w { my $wtf = 'xxx' if 0; warn $wtf; $wtf = "zzz"; }; w(); w();
Expected:Warning: something's wrong at t12.pl line 5. zzz at t12.pl line 5.
Warning: something's wrong at t12.pl line 5. Warning: something's wrong at t12.pl line 5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [BUG||FEATURE] Lexical variable saves state after out of scope
by davido (Cardinal) on Apr 26, 2012 at 08:18 UTC | |
by eyepopslikeamosquito (Archbishop) on Apr 26, 2012 at 13:06 UTC | |
|
Re: [BUG||FEATURE] Lexical variable saves state after out of scope
by moritz (Cardinal) on Apr 26, 2012 at 06:59 UTC | |
|
Re: [BUG||FEATURE] Lexical variable saves state after out of scope
by jwkrahn (Abbot) on Apr 26, 2012 at 06:43 UTC | |
|
Re: [BUG||FEATURE] Lexical variable saves state after out of scope
by Anonymous Monk on Apr 26, 2012 at 06:42 UTC |