do { offset = tell(filehandle) } while(line = readline(filehandle)) { print "line starts at offset: ", offset }