use strict;
use File::Find;
print "input your dir here: \n";
chomp(my $dir = <STDIN>);
print "counting,please waiting...\n";
find(\&wanted,$dir);
my $line_count;
sub wanted{
if(-f $_){
my $file = $_;
open(FILE,"<",$file) or die "Can't open $file $!\n";
$line_count++ while(<FILE>);
close(FILE);
}
}
print "Alother $line_count lines in $dir \n";
system("pause");
