Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Array of filehandles

by pachydermic (Beadle)
on Apr 29, 2013 at 13:50 UTC ( #1031209=note: print w/ replies, xml ) Need Help??


in reply to Array of filehandles

This might not be what you're looking for, but could help you do something similar - the benefit of this is that it's extremely quick and easy. While I like Perl's regex a lot, for this kind of thing I usually use a unix command like:

grep -r -l -I -s THINGTOSEARCHFOR DIRECTORYTOLOOKIN | cut -d: -f1

For which I have an alias in my .cshrc:

alias scour 'grep -r -l -I -s \!:1 \!:2 | cut -d: -f1'

The syntax is "scour thingtosearchfor directorytolookin".

To search every file in a directory (recursively) for a particular grep argument. Comes in handy sometimes. With the current options it just outputs the filenames, but you could easily tweak that.


Comment on Re: Array of filehandles
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-05 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls