Yeah, I have these pages burned into my pupils by now, but I have been
unable to modify them to my needs. I was able to get a little farther with
this:
sub find_class {
use File::Find;
sub finder {
return unless -f;
push (@files, $File::Find::name);
};
find (\&finder, $module);
};
But when I went to go print the elements of the array:
sub print_array {
my($count) = 0;
print "Printing array...\n";
while (@files) {
print "$count\t$files[$count]\n";
$count++;
};
};
It got stuck in an infinite loop.
Steve
-----Original Message-----
From: Peter Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 3:53 PM
To: Steve Best; [EMAIL PROTECTED]
Subject: Re: Help recursing directories and java mod question
At 03:44 PM 5/30/01 -0700, Steve Best wrote:
>Howdy, I used to do a bit of Perl programming but its all washed away
>through disuse. Sooo, I need to write a subroutine that will recurse from
a
>parent directory through all children directories, performing an action on
>files that match a pattern, in this case *.class. I have the Perl
cookbook,
>but its not really helping me out right now.
Pages 318-324, recipes 9.5 thru 9.7 :-)
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com