On Thu, Dec 18, 2003 at 04:31:20PM -0800, Jeff Westman wrote:
> Eric Walker <[EMAIL PROTECTED]> wrote:
> 
> > I got it so I need a counter which sends me to a for loop instead of a
> > foreach.  Thanks..
> > 
> > perlknucklehead
> 
> I believe that 'for' and 'foreach' are completely interchangable. I remember
> reading somewhere that one was a synonym for the other.

That is correct, though often people will refer to foreach meaning

  foreach VAR (LIST) BLOCK

and to for meaning

  for (EXPR; EXPR; EXPR) BLOCK

perldoc perlsyn

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to