Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2023-01-27 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?