hsinclai has asked for the wisdom of the Perl Monks concerning the following question:
The correct files in the first level directory get returned, but two additional things happen:#!/usr/bin/perl -w use strict; use Cwd; use File::Find; my $filespec = '*.pl *.txt'; my $dir = $ARGV[0] || getcwd(); find( { wanted => \&find_function, preprocess => \&globber }, $dir ); sub find_function { print $File::Find::name . $/; } sub globber { ( glob "$filespec" ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Behavior of File::Find's preprocess and glob
by edoc (Chaplain) on Feb 04, 2005 at 01:07 UTC | |
by hsinclai (Deacon) on Feb 04, 2005 at 02:13 UTC | |
by edoc (Chaplain) on Feb 04, 2005 at 02:30 UTC | |
by hsinclai (Deacon) on Feb 04, 2005 at 02:43 UTC |