Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by virtualsue (Vicar)
on Jan 29, 2007 at 10:07 UTC ( #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
Node Status?
node history
Node Type: note [id://597058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-10-21 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (100 votes), past polls