- or download this
my $root = rel2abs (shift || '.');
- or download this
my @extList = @ARGV;
@extList = ('pl', 'pm') if ! exists $extList[0];
- or download this
my @extList = @ARGV ? @ARGV : qw/pl pm/;
- or download this
my $lines = 0;
my $files = 0;
- or download this
my ($lines, $files); # is clear enough
- or download this
sub count
{
my $name = $File::Find::name;
return if -d $name;
- or download this
my ($ext) = $name =~ /\.([^.]*)$/;
return if ! defined $ext or ! exists $exts{$ext};
- or download this
return if grep $name =~ /\.\Q$_$/, @extList;
- or download this
return if ! open inFile, '<', $name;
- or download this
open my $in, '<', $name or # and I don't need close()
(warn "Ouch: $name => $!\n"), return;
- or download this
++$lines while (<inFile>);
- or download this
$lines+=<$in>;