Scope of variables in a function

Andrew Beverley andy at
Sat Jun 1 19:03:01 BST 2013

On Sat, 2013-06-01 at 19:13 +0200, Paul Johnson wrote:
> And the official line from perlsyn:
>     NOTE: The behaviour of a "my", "state", or "our" modified with a statement
>     modifier conditional or loop construct (for example, "my $x if ...") is
>     undefined. The value of the "my" variable may be "undef", any previously
>     assigned value, or possibly anything else. Don't rely on it. Future
>     versions of perl might do something different from the version of perl you
>     try it out on. Here be dragons.

Thanks for that. Obviously I should have RTM, but it does seem strange
that something that is not recommended does not produce any sort of


More information about the mailing list