[TAG] Perl Search Directory Function
Ben Okopnik
ben at linuxgazette.net
Wed May 28 04:31:13 MSD 2008
On Tue, May 27, 2008 at 03:41:01PM -0700, Thomas Bonham wrote:
> Hi All,
>
> Here is a 2 cent tip which is a little Perl script for looping through
> directory's.
Why not just use 'File::Find'? It's included in the default Perl
install, and is both powerful and flexible.
```
use File::Find;
find(sub { do_whatever_you_want_here }, @directories_to_search);
'''
For more info, see 'perldoc File::Find'.
--
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG
mailing list