Counted 900285 lines It took 6245 wallclock secs ( 6242.69 usr + 1.87 sys = 6244.56 CPU) #### #!/usr/bin/perl -w use Benchmark; my $start_time = new Benchmark; $line++ while (<>); # Count number of lines in the file(s) my $end_time = new Benchmark; my $difference = timediff($end_time, $start_time); print ("Counted $line lines\n"); print ("It took ", timestr($difference), "\n");