splice is a convenient way to remove things from the start of an array. For example, you could pass the start line as a parameter to your script and then use:
print "Skipping $count lines"; splice @lines, 0, $count; ... my $current_line_number = $count; foreach my $line (@lines) { print "Processing $current_line_number\n"; ... $current_line_number++; };
In reply to Re: Foreach loop help. Start from specific line
by Corion
in thread Foreach loop help. Start from specific line
by Doozer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |