in reply to Flat-File

I'd use the CGI modules too, because they are way better suited to what you are about to do.

In any case, I would not try writing to the CGI-BIN directory (this might be a security hole) but I'd ask my sysadmin for a directory I can read and write to.

In your code, I think it's useless to read all the lines of the movie database up front; I'd read wwhile I find the movie I'm interested in and skip the rest.