in reply to Pushing w/ an associative array?

basically, I'm opening a text file and writing whatever was input to it

And to join the chorus here ... use CGI.pm! I mean, even if you're not into all the param() stuff or the wonderful HTML abilities it has or the way it hides all the messy CGI stuff behind a very simple and intuitive interface, you can still take advantage of its save() method which does exactly what you're looking for (and, furthermore, allows you to reload that data into a CGI object if you want to at some later date).