Help for this page
open(my $fh, '<', $file) or die("Can not open file $file to read!\n"); while(<$fh>) { ... } print "\n# of lines: $.\n"; close($fh);