So far I did this:
#!/usr/bin/perl
use File::Find;
my $totalLines;
find(\&wanted, '@directories');
sub wanted {
unless ($_=~m/.html|.mas|.pl|.txt$/i) {return 0;} #filter the kinds
of files you want
open FILE, "<$File::Find::name";
print "$_: ";
my @lines=<FILE>;
print "$#lines\n";
$totalLines+=$#lines; #wanted's value is ignored so we have to
do this here.
return;}
print "$totalLines\n";
This only limits me by the size of the file, or no?
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>