Don't forget the poetic possibilities, either.  Not to mention
doggerel and corruption, i.e.:  "I have heard the mermaids singing foreach
to foreach". 
        "For to for" just wouldn't cut it.  
-Chris   

-----Original Message-----
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 08, 2004 3:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Use of FOR statement

Paul Kraus wrote:
>
> Wow just tested that for (@array) do something.
> I didn't think that would work.
>
> So there is no difference as far as the compiler is concerned with for and
> foreach? Why bother having both then?

The practical reason is likely to be historical, but Larry would tell you
all
about the value of redundancy in the syntax of spoken, written and computer
languages. Perl is full of it (for instance 'use English' and then $ARG
is the same thing as $_) and it goes a long way towards making the language
what it is. Not forgetting TMTOWTDI of course!

Rob



-- 
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