Posted By

counter202 on 01/26/09


Tagged

dir files


Versions (?)

Recipe 9.7. Processing All Files in a Directory Recursively


 / Published in: Perl
 

URL: http://docstore.mik.ua/orelly/perl/cookbook/ch09_08.htm

  1. use File::Find;
  2. @DIRLIST ="C\:\\Downloads\\";
  3.  
  4. sub process_file {
  5. # do whatever;
  6. print "$File::Find::name\n";
  7.  
  8. }
  9. find(\&process_file, @DIRLIST);

Report this snippet  

You need to login to post a comment.