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

Re^3: searching for multiple lines from outfile and printing them all in the final outfile

by Bloodnok (Vicar)
on May 16, 2009 at 11:31 UTC ( [id://764409]=note: print w/replies, xml ) Need Help??


in reply to Re^2: searching for multiple lines from outfile and printing them all in the final outfile
in thread searching for multiple lines from outfile and printing them all in the final outfile

If the lines you require are consecutive, then you could use the range operator to do it along the lines of i.e. untested...
use warnings; use strict; use autodie; open INFILE, "<infile"; open OUTFILE, ">outfile"; while (<INFILE>) { print OUTFILE if /start regex/ .. /end regex/; } close INFILE; close OUTFILE;
A user level that continues to overstate my experience :-))
  • Comment on Re^3: searching for multiple lines from outfile and printing them all in the final outfile
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-25 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found