in reply to ignoring the first element of an array
# Use a sentinel variable my $first; foreach my $well (@derivative) { next unless $first++; # Do something } # Use an array slice foreach my $well (@derivative[1..$#derivative]) { # Do something } # Use the array indices foreach my $i (1..$#derivative) { my $well = $derivative[$i]; # Do something }
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: ignoring the first element of an array
by Anonymous Monk on Feb 03, 2003 at 12:56 UTC | |
by DaveH (Monk) on Feb 03, 2003 at 14:03 UTC | |
by Hofmator (Curate) on Feb 03, 2003 at 14:34 UTC |