>>>>> "Mark" == Mark Van <[EMAIL PROTECTED]> writes:

Mark> I am writing some blog software, but I can't figure out how to write
Mark> to the beginning of a file, because when I print to the file it always
Mark> goes at the end. Also, I don't want to overwrite the existing text in
Mark> the file, I want to insert the new text.

You have to rewrite the entire file, and if you're doing it in a
multiprocess environment (like a CGI script), you have to ensure that
you're the only one accessing the file.

And, if you're writing blog software, and don't know what "cross site
scripting" is, and how to prevent it, then please stop.  There are
plenty of existing blog implementations out there.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to