Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
go ahead... be a heretic
 
PerlMonks  

Re: Looping through end of file once a match is found

by mkmcconn (Chaplain)
on Jun 21, 2005 at 15:47 UTC ( [id://468799]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Looping through end of file once a match is found

Would you be looking for something as simple as this ?

# when $search_date is found beginning in the 52nd column # of a log entry that begins with 6 digits, then # print the matching line and the remainder of the file. my $gate = ''; for(<FILE>){ if ( $gate || ($gate = /^\d{6}.{45}$search_date/)){ print RESULT; } }

mkmcconn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468799]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.