Win has asked for the wisdom of the Perl Monks concerning the following question:
The following section is not working properly:#! perl -w scipt use strict; use warnings; use File::Find::Rule; use File::Find::Rule; # find all the subdirectories of a given directory my $directory = "U:/2004_2005/Application/Development/Useful_methods/" +; my $directory_label = "U:/2004_2005/Application/Development/Useful_met +hods"; my @subdirs = File::Find::Rule->directory->in( $directory_label ); print @subdirs; #exit; foreach (@subdirs){ print "Hi\n"; # if ($_ !~ /$directory_label|$directory/){ print $_; print "\n\n"; my $directory_current = $_; # print cwd(); # print \n; my $rule = File::Find::Rule->new; $rule->directory( '$directory_current' ); $rule->file; $rule->name( '*.*' ); #$rule->name( qr/^[^.]{118,1000}$/); # # ); # (\.[^.]{0 +,20})?$/ ) ; # $rule->name( qr/^.{20,1000}$/); my @files = $rule->in( @INC ); foreach(@files){ print $_; } # } }
my @files = $rule->in( @INC ); foreach(@files){ print $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use File::Find::Rule
by tirwhan (Abbot) on Jul 31, 2009 at 17:04 UTC | |
|
Re: use File::Find::Rule
by MidLifeXis (Monsignor) on Jul 31, 2009 at 16:55 UTC | |
|
Re: use File::Find::Rule
by Anonymous Monk on Jul 31, 2009 at 17:03 UTC | |
by Win (Novice) on Jul 31, 2009 at 17:15 UTC | |
|
Re: use File::Find::Rule
by Marshall (Canon) on Aug 02, 2009 at 02:37 UTC |