"Brett W. McCoy" schrieb:
>
> On Tue, 18 Sep 2001, Andrea Holstein wrote:
>
> > Try
> > for (my $i=0, my $var = $array[$i]; $i < @array; $i++, $var =
> > $array[++$i]) {
> > ...
> > }
>
> Good Heavens! Why would you go to all of that trouble when a simple
> foreach will do?
>
You're right,
but
foreach my $var (0..$#array) {
...
}
has to create a new list (0..$#array) of the same size as @array.
In my job, I often have to work with large lists,
so I don't like to pay this price.
Rasoul Hajkhani didn't wrote something about the content of @array.
TMTOWTDI
Greetings,
Andrea
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]