On Fri, 1 Mar 2002, Jon Molin wrote:

> > It merely depends on your preferences, readable/maintanable code vs
> > quick && dirty.
>
> if there's no difference, what's the point of having both? I can't see
> how readable/maintanable would increase by adding functions with the
> same name, it'd rather increase the confusion...
>
> is there really no diff?

AFAIK, they aren't any different.  'for' is typically used with C-style
loops or aliasing in a switch-like block, or when you are declaring an
explicit loop variable, and foreach is used for brevity, when you aren't
declaring a loop variable.  Perl, unlike a lot of other programming
languages, mimics natural languages, and we have synonyms in a lot of
places.

Use what you like, but like what you use!

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
A baby is an alimentary canal with a loud voice at one end and no
responsibility at the other.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to