in reply to Perl LineCount
Here's some similar code I just whipped up, doing roughly the same thing:
use File::Find; my @topdirs = @ARGV; @ARGV = (); find sub { push @ARGV, $File::Find::name if /\.p[lm]\z/ and -f; }, @topdirs; my $count = 0; @ARGV or die "No files to process!\n"; $count++ while <>; print "Total $count lines\n";
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl LineCount
by zoonek (Novice) on Jul 19, 2002 at 11:19 UTC |