Really simple question.
Jonathan Stowe
jns at gellyfish.com
Thu Feb 8 18:25:07 GMT 2007
On Thu, 2007-02-08 at 18:01 +0000, Daniel Barlow wrote:
> Andy Armstrong wrote:
> > The normal idiom is
> >
> > for my $i ( 0 .. $#arrayname ) {
> > # do some stuff
> > }
> >
> > You can use C style for loops if you must
> >
> > for ( my $i = 0; $i < @arrayname; $i++ ) {
> > # do some stuff
> > }
> >
> > It's generally neither necessary or desirable though.
>
> Well, and I learn something new every day. Muttering about generating
> big temporary arrays, off I go to perlop(1) and find it now says
<doesn't do that any more>
I think it has been like that for nearly nine years now :-O
/J\
More information about the london.pm
mailing list