I'd try commenting out chunks of code until you get the minimum code that generates the error. Very likely the bug will pop out and hit you in the eye in the process. If not, post the reduced code here. Note that you shouldn't need any external files or system calls to reproduce the problem! Show us the exact error line from your log too may help.
Does the following produce clean results for you?
#!/usr/bin/perl
use strict;
use warnings;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
$CGI::POST_MAX = 2097152; ## (2mb upload max)
$CGI::DISABLE_UPLOADS = 0; ## allow uploads
my $upload_path = "/export/";
#my $filename = $upload_path . param('excel');
sub print_header {
my $title = shift;
print header, start_html($title);
}
sub init {
my $upload = 0;
unless (param('excel')) {
print_header ('Excel to XML Converter');
#print_upload_form();
## make sure there's actually something being uploaded
} elsif (!$upload && cgi_error) {
print_header ('Excel to XML Converter: Error!');
print h1("No file uploaded!");
## all is well, show conversion confirmation
} else {
show_convert();
}
}
init();
print end_html();
DWIM is Perl's answer to Gödel