in reply to HELP!! urgent!writing contents toa specific line in an existing file
Have you looked at Tie::File? Otherwise, you will have to read in the file, make your changes and then write out the whole file again.
Good luck with your teacher!