Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Getting next line after matched one

by rnahi (Curate)
on Dec 30, 2004 at 20:58 UTC ( #418400=note: print w/replies, xml ) Need Help??


in reply to Getting next line after matched one

The one-liner approach:

$ cat input.txt one two three four five six seven $ perl -ne 'print $_ = <> and last if /five/' input.txt six

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418400]
help
Chatterbox?
[chacham]: upgrading android studio means having all your projects not work.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-03-29 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (343 votes). Check out past polls.