Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: search for a pattern in file without opening the file

by virtualsue (Vicar)
on Jan 29, 2007 at 10:07 UTC ( [id://597058]=note: print w/replies, xml ) Need Help??


in reply to search for a pattern in file without opening the file

I'm not saying this is the answer to your question, but perhaps you should have a look at File::Grep.

File::Grep mimics the functionality of the grep function in perl, but applying it to files instead of a list. This is similar in nature to the UNIX grep command, but more powerful as the pattern can be any legal perl function.

For those who were quick with the tedious wisecracks -- perhaps the OP meant that he didn't want to have to do the file open in his own code.

  • Comment on Re: search for a pattern in file without opening the file

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found