Odd script behavior.
am 29.11.2005 16:26:43 von cogrossI have some perl code, running through CGI that is behaving oddly, and
I can't seem to figure out what is going wrong.
At the end of a Report Module, I have this:
#logging code added
my $dir =
$cf{'reportsdatadirectory'}."/$cf{'journalabbrev'}_".time(). "_extraction_rpt.log";
open(LOG, ">$dir");
print LOG time()."-----opened log!\n\n";
##### Display excel download button and print button if
appropriate
if ($printer) {
print &get_print_start();
} else {
&send_start();
print LOG time()."-----calling
&get_print_report_button()\n";
print &get_print_report_button();
print LOG time()."-----done
&get_print_report_button()\n\n";
print LOG time()."-----calling &write_excel_from_html()\n";
print LOG time()."excel_file=[$excel_file]\n";
print LOG time()."rpt_html=\n$rpt_html\n";
# Generate excel file and display button to download it
&write_excel_from_html(\$rpt_html, $excel_file);
print LOG time()."-----done &write_excel_from_html()\n\n";
print LOG time()."-----preparing to make excel button\n";
print
"
print LOG time()."-----get_form_field_submit
results:[".&get_form_field_submit("Download Report to Excel")."]\n";
print LOG time()."-----excel button made\n\n";
}
print LOG time()."-----dump report html\n";
##### Dump report
print $rpt_html;
print LOG time()."-----report html dumped\n\n";
}
print LOG time()."-----printing ending\n";
# End report
if ($printer) {
print "