![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
directory |
07/02/2006 |
Recursively walks trought directories and execute a 'doit' fonction. This example uses 'Find' and 'Basename' standard module.
#!/usr/local/bin/perl use File::Find; use File::Basename; @ARGV=qw(.) if not @ARGV; find(\&doit, @ARGV); #function to execute sub doit { $fpath=$File::Find::name; $fname=basename($fpath); # print "$fname $fpath\n"; }