in reply to Find, read, write out contents of a certain file type recursively...
PS you probably want to open your output file outside the search LOOP!use File::DosGlob; $dir= '/home/javascript/*'; # note trailing * !!! my @m = File::DosGlob::doglob(1,$dir); for (@m) { push @m, File::DosGlob::doglob(1,$_.'/*') if -d($_); next unless (/\.js$/); # put your code here to # open file ($_) and search open(JS,"<$_") or die "Can't Open $_: $!"; # etc. }
Dingus
|
|---|