Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Foreach loop help. Start from specific line

by parv (Priest)
on Oct 22, 2012 at 13:28 UTC ( #1000341=note: print w/ replies, xml ) Need Help??


in reply to Foreach loop help. Start from specific line

# Fill in blanks as needed. my $file = '...'; my $start = ... ; my @content; open my $fh , '<' , $file or die "Cannot open $file to read: $!"; while ( my $line = <$fh> ) { next if $. < $start; push @content , $line; } close $fh or die "Could not close $file: $!"; ...


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://1000341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-07-03 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls