The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#!/usr/bin/perl
use strict;
my $counter = SourceCode::LineCounter::Perl->new;
foreach my $file ( @ARGV ) {
$counter->count( $file );
}
my $template = <<'HERE';
files: %s
total: %s
documentation: %s
code: %s
comment: %s
blank: %s
HERE
printf $template,
scalar @ARGV,
map { $counter->$_() }
qw( total documentation code comment blank );