Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: What's wrong with this grep?

by ikegami (Patriarch)
on Nov 07, 2009 at 09:35 UTC ( [id://805630]=note: print w/replies, xml ) Need Help??


in reply to What's wrong with this grep?

And then there's File::Find::Rule
use File::Find::Rule qw( ); my @files = File::Find::Rule ->name( qr/^\d{8}\.\d{6}\.host\d\.\d{1,6}$/ ) ->file() ->maxdepth(1) ->in( $path );

The advantage is that you get qualified file names.

It's cheaper to execute a regex match than to check if a file is a plain file, so I reversed the order of the tests.

Log In?
Username:
Password:

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

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

    No recent polls found