# $fh is your file handler seek($fh, $old_position, 0); my $buffer = read($fh, 200000); # read ~200KB from the file # save current position $old_position = tell($fh); # do whatever you want with the buffer # here..