in reply to write to local files? and why does strict bugger this online but not locally?
It sounds like the user for your CGI (nobody on Unix, IUSER_GUEST on NT, usually) doesn't have access to write to the directory. Also, you probably want to use a chdir or specify a directory for the file.
One of your "die" messages probably caused the 500 error. Include use CGI::Carp qw(fatalsToBrowser); or add some code to print a header to see your "die" messages in CGI.