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-----------";
Here's a cleaned up version: use strict; use warnings; use File::Find; my @dir = 'F:/Hindi/RHTDM'; my $cnt; find( sub{++$cnt and print "$cnt $_\n" if /\.mp3$/}, @dir); print "\n\n----------- ALL DONE-----------"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/