#!/usr/local/bin/perl -w use Time::HiRes 'time'; $file = 'mshtmlc.h'; my @t = time; open IN, '<', $file or die "Can't read file: $!"; while() { # nada } close IN; push @t, time; open IN, '<', $file or die "Can't read file: $!"; while(read IN, $_, 1024) { # nada } close IN; push @t, time; printf <<'--', $t[1]-$t[0], $t[2]-$t[1]; line by line: %.3f s 1k blocks: %.3f s --