Recipe 9.7. Processing All Files in a Directory Recursively


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  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);

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.