From: Martien Verbruggen Date: Tue, 31 Dec 2002 16:42:28 +0000 (+1100) Subject: Re: [perl #19236] perlsyn: implicit localisation in while() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c502d376a49ad340448e0e2cf8122d9ef9a6bcf;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #19236] perlsyn: implicit localisation in while() Message-Id: p4raw-id: //depot/perl@18532 --- diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index c279330..0d81b24 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -183,8 +183,6 @@ refers to the innermost enclosing loop. This may include dynamically looking back your call-stack at run time to find the LABEL. Such desperate behavior triggers a warning if you use the C pragma or the B<-w> flag. -Unlike a C statement, a C statement never implicitly -localises any variables. If there is a C BLOCK, it is always executed just before the conditional is about to be evaluated again, just like the third part of a @@ -319,7 +317,8 @@ is therefore visible only within the loop. Otherwise, the variable is implicitly local to the loop and regains its former value upon exiting the loop. If the variable was previously declared with C, it uses that variable instead of the global one, but it's still localized to -the loop. +the loop. This implicit localisation occurs I in a C +loop. The C keyword is actually a synonym for the C keyword, so you can use C for readability or C for brevity. (Or because