#!/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();