in reply to Fiddling with File::Find
And now it's even backward compatible to the version of Perl my ISP is running (5.5.3).sub Search_File { require File::Find; my ($start_path, $search_name) = @_; my @matching_files = (); if ($search_name) { # Traverse desired filesystems File::Find::find(sub { /^$search_name\z/si && push(@matching_files, $name); }, $start_path); } return @matching_files; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Fiddling with File::Find
by jlongino (Parson) on Oct 06, 2001 at 02:18 UTC | |
by chromatic (Archbishop) on Nov 19, 2001 at 01:01 UTC | |
by jlongino (Parson) on Nov 19, 2001 at 01:46 UTC | |
by merlyn (Sage) on Oct 06, 2001 at 19:53 UTC |