cammac has asked for the wisdom of the Perl Monks concerning the following question:
I have a file I've opened,
somewhere in the body, I realize that what I need is on the next line of the file.open TF, "< $tfile" ; foreach $line (<TF>) {
Is there a way within the foreach loop to get the next line? And is there a way to advance the file handle so it doesn't re-read the next line in the foreach loop?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: advancing in file read
by almut (Canon) on May 15, 2010 at 20:46 UTC | |
by cammac (Acolyte) on Jun 01, 2010 at 16:21 UTC | |
|
Re: advancing in file read
by biohisham (Priest) on May 16, 2010 at 04:28 UTC | |
|
Re: advancing in file read
by choroba (Cardinal) on May 16, 2010 at 11:22 UTC | |
|
Re: advancing in file read
by Marshall (Canon) on May 16, 2010 at 19:34 UTC | |
|
Re: advancing in file read
by apl (Monsignor) on May 16, 2010 at 13:21 UTC | |
by ikegami (Patriarch) on May 16, 2010 at 19:40 UTC | |
by apl (Monsignor) on May 16, 2010 at 21:13 UTC | |
by ikegami (Patriarch) on May 16, 2010 at 21:26 UTC | |
by apl (Monsignor) on May 17, 2010 at 10:34 UTC | |
|