in reply to File Find question
But why not just say the following?#!/usr/local/bin/perl -w use strict; use File::Find; my $dirs = '/web/directory'; find(\&search, $dirs); sub search { print "$File::Find::name\n" if -d and /\A(?:AA|BB|CC)\z/; }
If you don't want any other dirs, why descend anywhere else?#!/usr/local/bin/perl -w use strict; use File::Find; my $dirs = '/web/directory'; find(\&search, map "$dirs/$_", qw(AA BB CC)); sub search { # ... }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: File Find question
by Anonymous Monk on Nov 06, 2002 at 20:14 UTC | |
by Aristotle (Chancellor) on Nov 06, 2002 at 20:22 UTC | |
by Anonymous Monk on Nov 06, 2002 at 20:38 UTC | |
by Aristotle (Chancellor) on Nov 06, 2002 at 20:41 UTC |