#!/usr/bin/perl -w

my $lc=0;
my $flc;
my $filename;
while(<>) {
  $filename=$_;
  chomp($filename);
  open(IN,"<$filename");

  $flc=0;
  while(<IN>) {
    $flc++;
    $lc++;
  }

  print "$filename: $flc\n";
}

print "Total: $lc\n";
