In the browser the code fails on the last line but its ok on command line.
The user on the command line often has different permissions than the user running the web server.
Try testing on the command line as the user running the webserver.
Also test for success when opening the connection to the database and when opening the file:
my $dbh = DBI->connect( ... ) or die $DBI::errstr;
my $output = new IO::File( ... ) or die $!
Cheers, Sören
In reply to Re: XML::Writer writes file from the command line but not via a CGI
by Happy-the-monk
in thread XML::Writer writes file from the command line but not via a CGI
by craigmarksmith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |