Subject: Re: directory recursion
From: Michael Fowler (michael@shoebox.net)
Date: Fri Mar 08 2002 - 15:17:39 AKST
On Fri, Mar 08, 2002 at 01:49:35PM -0900, Mike Barsalou wrote:
> I am looking for a directory recursion routine for perl. I found the
> File::find module, but not sure how to use it.
File::Find is fairly simple to use. Import the find() function, then pass
it two or more arguments: a subroutine reference, and a list of files or
directories.
find(\&wanted, @files_or_directories);
The wanted subroutine (if that's what you call it) is called for each file
and directory found. See perldoc File::Find for more information.
Michael
-- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --
This archive was generated by hypermail 2a23 : Fri Mar 08 2002 - 15:18:53 AKST