On Nov 5, 2008, at 3:50 PM, Mike Hostetler wrote:
sub logFinder {
my $proc="pat"
my @files=();
sub wanted {
/^$proc.*/s
&& push(@files,$File::File::name);
}
find(\&wanted ,$logdir);
First, there's no need to match /^$proc.*/, because it is the same as / ^$proc/.
I think something is missing here. Is wanted() inside of logFinder? Why? Perl doesn't nest subs like that.
Can you show us an entire program? xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance