# 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.
In reply to Re: ignoring the first element of an array
by jmcnamara
in thread ignoring the first element of an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |