my $fname = $_;
if (-f $fname) {
foreach my $type (qw(pl pm)) {
my (undef, $ext) = split (/\./, $fname);
if (defined($ext) && $ext eq $type) {
push(@files, $File::Find::name);
}
}
}
It would be better to instead have...
my $fname = $_;
if (-f $fname && /\.p(l|m)$/) {
push(@files, $File::Find::name);
}
...or so I believe. The reason I changed my own copy to this is that I have scripts with the version number at the end like so...
Frans_Perl_Program.1.5.1.pl
...when I am working on something by stages. |