in reply to output from cgi
Depending on your application and your users, you might want to write up a prettier error handling routine, instead of relying on a die. In a CGI, die writes the error to the server logs. If you use CGI(FatalsToBrowser) it'll write the plain text of the error to the browser. Good for you during development, probably not good for your users.open (DAT, ">file.txt") or die "Can't open file.txt: $!\n";
But whatever you do, make sure your open call worked before writing to the filehandle.
|
|---|