Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Getting next line after matched one

by Eimi Metamorphoumai (Deacon)
on Dec 30, 2004 at 20:51 UTC ( [id://418393]=note: print w/replies, xml ) Need Help??


in reply to Getting next line after matched one

If you don't have to worry about consecutive lines, you could just read and print the next line.
while (<FILE>){ if (/text to check for/){ my $nextline = <FILE>; print $nextline; } }
(or simply print scalar(<FILE>);)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-26 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found