diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2002-02-19 10:30:30 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-19 13:34:16 +0000 |
commit | 5d6b5b93661d8e778bcde761acff338795b8e86c (patch) | |
tree | 3f072148c269c783b1991112d991db5ecc5cb3c4 /pod | |
parent | 5f08bad4ff5fa1f5c9fc35ec44b00200041a325e (diff) | |
download | perl-5d6b5b93661d8e778bcde761acff338795b8e86c.tar.gz |
{PATCH] Re: Lexical scoping bug with EXPR for EXPR?
Message-Id: <200202191030.KAA24180@gizmo.fdgroup.co.uk>
p4raw-id: //depot/perl@14769
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlsub.pod | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 8ec39e35b9..168f305f8f 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -327,9 +327,12 @@ the scope of $answer extends from its declaration through the rest of that conditional, including any C<elsif> and C<else> clauses, but not beyond it. -None of the foregoing text applies to C<if/unless> or C<while/until> -modifiers appended to simple statements. Such modifiers are not -control structures and have no effect on scoping. +B<NOTE:> None of the foregoing text applies to C<if/unless>, +C<while/until> or C<for> modifiers appended to simple statements. Such +modifiers are not control structures and have no effect on scoping. Use +of such modifiers in conjunction with C<my> may have unexpected effects, +and are best avoided. A future release of Perl may define precise +semantics for constructs such as C<my $foo = 1 if $bar>. The C<foreach> loop defaults to scoping its index variable dynamically in the manner of C<local>. However, if the index variable is |