use strict; use File::Find; my $myfile = ">mytext.txt"; open(FILE,"$myfile") || "can not open: $!\n"; my $fil=0; my $dir=0; sub search { next if(($_ != m/^\.+$/) || ($_ != m/^ws\_ftp/i)); { if (!-l && -d) { print FILE "\n\nDIRECTORY\t\t$File::Find::name\n"; print FILE "-----------------------------------------------\n" +; $dir++; } else { print FILE "$_\n"; $fil++; } } } find(\&search, '/mydirectoryname'); print FILE "\n____________________________________\n"; print FILE "\n\nTotal Directory count = $dir.\n"; print FILE "\nTotal File count = $fil.\n"; close(FILE);
In reply to Fetdching filenames starting numbers. by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |