[LA.pm] Command line loops?

Douglas Wilson dgwilson at gtemail.net
Wed May 21 18:55:25 CDT 2003


> From: Ron Smith
>Is there a Perl way to do a command line
> loop that reaches down recursively into directories
> and 'greps' out certain files of the same type?

If by 'type' you mean 'extension', then you
can use File::Find, or the handy File::Find::Rule

use File::Find::Rule;

my @files = File::Find::Rule->file->name('*.txt')->in("/some/directory");

-- 
_______________________________________________
Get your free Verizonmail at www.verizonmail.com




More information about the Losangeles-pm mailing list