On Mon, May 25, 2009 at 23:50, sanket vaidya wrote:
snip
> So to conclude
> 'for' & 'foreach' are the two different ways to write same thing & there is
> no particular advantage of using one over other.
>
> Group, correct me if I am wrong.
snip
I wouldn't say there is no advantage; for is four ch
-Original Message-
From: Randal L. Schwartz [mailto:mer...@stonehenge.com]
Sent: Monday, May 25, 2009 10:10 PM
To: beginners@perl.org
Subject: Re: Difference between for & foreach loop
>>>>> ""sanket" == "sanket vaidya" writes:
&quo
> ""sanket" == "sanket vaidya" writes:
"sanket> What is the difference between the 'for' & 'foreach' loops? I know
that they
"sanket> can be used interchangeably then what is the purpose of keeping them
"sanket> separate? Can anyone suggest me a good url which can tell the
difference
"sanke
On Mon, May 25, 2009 at 03:16, Gunnar Hjalmarsson wrote:
> sanket vaidya wrote:
>>
>> What is the difference between the 'for' & 'foreach' loops? I know that
>> they
>> can be used interchangeably then what is the purpose of keeping them
>> separate?
>
> The _words_ 'for' and 'foreach' can be used
sanket vaidya wrote:
What is the difference between the 'for' & 'foreach' loops? I know that they
can be used interchangeably then what is the purpose of keeping them
separate?
The _words_ 'for' and 'foreach' can be used interchangeably in foreach
loops, but a true for loop is something else.
2009/5/25 sanket vaidya :
> What is the difference between the 'for' & 'foreach' loops?
There is none.
http://perldoc.perl.org/perlsyn.html#Foreach-Loops :
"The foreach keyword is actually a synonym for the for keyword, so you
can use foreach for readability or for for brevity. (Or because the
Hi all,
What is the difference between the 'for' & 'foreach' loops? I know that they
can be used interchangeably then what is the purpose of keeping them
separate? Can anyone suggest me a good url which can tell the difference
between two?
Thanks & Regards,
Sanket Vaidya
_