Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There's a for-loop, with three expressions (sometimes called "C-style for").
There's a foreach-loop, with single scalar (sometimes implied with $_) and a list of values to be walked (sometimes called a "csh-style foreach"). They're definitely two different kinds of loops. However the text for and foreach may be used to introduce either one. The actual loop-style is determined by what follows. -- Randal L. Schwartz, Perl hacker
In reply to •Re: Re: Re: Lexicals in if() scope gotcha!
by merlyn
|
|