On Aug 28, 10:10 pm, [EMAIL PROTECTED] (Omega -1911) wrote: > Ha! Here is a snippet that I use on a windows machine. It works!!! > > use File::Find; > > sub rm(); > $count = 0; > @directories = ("F://Hindi/RHTDM"); > find(\&rm, @directories); > > sub rm() { > $count++; > my ($filename) = $_; > if ($filename =~ /jpg/) { > print "$count\t$filename\n"; > } > print "\n\n----------- ALL DONE-----------";
I posted a followup to this earlier, but it seams to have vanished, so I'll post it again with a slight change. It's just a cleaned up version. use strict; use warnings; use File::Find; my @dir = 'F:/Hindi/RHTDM'; my $cnt; find( sub{print ++$cnt . " $_\n" if /\.jpg$/}, @dir); print "\n\n----------- ALL DONE-----------"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/