Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Foreach loop help. Start from specific line

by Corion (Pope)
on Oct 22, 2012 at 12:47 UTC ( #1000325=note: print w/ replies, xml ) Need Help??


in reply to Foreach loop help. Start from specific line

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++; };


Comment on Re: Foreach loop help. Start from specific line
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000325]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-12-27 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls