in reply to Advanced appending to file

Seek and tell are what you need for moving output around a file
# Open existing file open(FILE, "+<filename.txt") || or die "error: $!"; seek(FILE, 0, 2); # seek to the end of the file print FILE "On the end"; # Appended to the end of the file seek (FILE, 0, 0); # seek to the begining of the file print File "At the begining"; my $point = tell(FILE); # tell where you are in the file # Here tell will be 15 becuase you are at the end of "At the begining"
These are all in the perlfunc docs