while ( <> ) { print "Reading line $. in file $ARGV.\n"; $. = 0 if eof; }