ppm has asked for the wisdom of the Perl Monks concerning the following question:
i use File::Find to get a list of all files from a directory:
This works fine .. but how i've write the code to get only files with desired extensions, eg.use File::Find; my $base = "c:/blub"; find( sub { push(@dateien, $File::Find::name) }, $base );
Only this types should pushed into the list. And finaly i will exclude some directory, eg..my $ext = "html|php";
With a regex i would do this likemy $dirs = "/cgi-bin|log";
Any ideas how to do this for my code? thx a lot for your help!/\.($ext)$/i;
ppm
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Need help with File::Find
by broquaint (Abbot) on Feb 26, 2003 at 15:27 UTC | |
by tachyon (Chancellor) on Feb 26, 2003 at 15:50 UTC | |
by runrig (Abbot) on Feb 26, 2003 at 19:58 UTC | |
Re: Need help with File::Find
by jasonk (Parson) on Feb 26, 2003 at 15:21 UTC | |
by ppm (Novice) on Feb 26, 2003 at 15:44 UTC | |
Re: Need help with File::Find
by tachyon (Chancellor) on Feb 26, 2003 at 15:30 UTC | |
by ppm (Novice) on Feb 26, 2003 at 15:54 UTC | |
by jeffa (Bishop) on Feb 26, 2003 at 16:33 UTC | |
by ppm (Novice) on Feb 26, 2003 at 17:14 UTC | |
by ppm (Novice) on Feb 26, 2003 at 17:22 UTC | |
by tachyon (Chancellor) on Feb 26, 2003 at 16:07 UTC | |
Re: Need help with File::Find
by toadi (Chaplain) on Feb 26, 2003 at 15:25 UTC |