[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Deep directory find (was: out of mem...)



On 14/6/00, rees_joel@fujicomp.co.jp (Joel Rees) wrote

> I seem to recall someone saying that there is a package that recursively 
> lists directories floating around.

Try File::Find; eg:

#!perl -w
use File::Find;

sub open_and_parse {
    my $in = $_;
    if (-f) {
                my $f =  $File::Find::name;
                print $f, "\n";
    } 
    $_ = $in;  #<---- very important (you'll know why
               #      when you read File::Find's docs).
}
find(\&open_and_parse,  'Workshop HD:');
--
          Rory Campbell-Lange   +   The Campbell-Lange Workshop
                              London




==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org