32.21. File::Find
The File::Find module's find function recursively descends
directories. Its first argument should be a reference to a function,
and all following arguments should be directories. The function is
called on each filename from the listed directories. Within that
function, the $_ variable is set to the basename of the current
filename visited, and the process's current working directory is by
default set to that directory. The package variable
$File::Find::name is the full pathname of the visited filename. An
alternative calling convention takes as its first argument a reference
to a hash containing option specifications, including "wanted",
"bydepth", "follow", "follow_fast", "follow_skip",
"no_chdir", "untaint", "untaint_pattern", and
"untaint_skip", as fully explained in the online documentation.
This module is also used by the standard find2perl(1) translator
program that comes with Perl.
![]() Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|