-=| [email protected], 11.08.2013 12:58:37 +0800 |=-
> Package: perl-doc
> Version: 5.14.2-21
> Severity: wishlist
> File: /usr/share/man/man1/perlsyn.1.gz
> 
> perlsyn says
> 
>    For Loops
>        Perl's C-style "for" loop works like the corresponding "while" loop;
>        that means that this:
> 
>            for ($i = 1; $i < 10; $i++) { #BUT HOW DOES ONE USE my HERE the 
> reader wonders
>                ...
>            }
> 
>        is the same as this:
> 
>            $i = 1;
>            while ($i < 10) {
>                ...
>            } continue {
>                $i++;
>            }
> 
>        There is one minor difference: if variables are declared with "my" in
>        the initialization section of the "for", the lexical scope of those
>        variables is exactly the "for" loop (the body of the loop and the

The answer is right there. «in the initialization section of the 
"for"».


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to