$requested_start = ...; # a value between 0 and 1 $avg_line_len = ...; # make a guess or read a small sample to estimate this $file_size = -s $filename; $read_length = $avg_line_len * 1000; seek( FH, $file_size * $requested_start, 0 ); read( FH, $text, $read_length ); $text =~ s/^.*\n//; # trim initial and final $text =~ s/.*$//; # line fragments from $text