Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[davies]: LanX: No. The mayor of London would better be described as the transport commisar for London. S/h/it doesn't have a tenth of the power of La Sturgeon (and therefore does <10% of the damage).
[LanX]: xD ... complicated countrie(s)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-12-15 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (440 votes). Check out past polls.

    Notices?