On Tue, Jul 31, 2001 at 12:36:37PM -0500, Mooney Christophe-CMOONEY1 wrote:
> Oh yeah, and another thing; i think
> for (my $i=0; $i<$n; $i++)
> is preferable to
> for my $i (0...$n-1)
> since the latter creates the entire array and then goes through the
> elements, instead of merely going from one integer to the next.
Actually, since 5.005 the foreach (0..$n) syntax has been optimized into a
counting loop, so it no longer creates a list.
I still prefer a for(;;) loop because it is more descriptive of what's going
on, but there's no real technical reason for it anymore.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]