#!/usr/bin/perl -wT $|++; use strict; use CGI qw(:standard); # important shortcuts use Fcntl qw(:flock); # imports LOCK_EX, LOCK_SH, LOCK_NB my $timestamp = localtime; # this should be as suggested above "/usr/bin/perl /path/to/Kreports.plx" my $script_to_call = "./Kreports.plx"; $TITLE = "Kim's Report Generator"; $LOGFILE = "/usr/tmp/KreportLog"; print header,start_html($TITLE),h1($TITLE); if ( param('name') ) { # if we have a name we must have been called from our form if ( ( param('name') eq 'Kim' ) and ( param('passwrd') eq 'Knecht' ) ) { &runReports(); } else { print "Unauthorized!\n"; } } else { # no name param so show form print hr, start_form; # hr() emits a horizontal rule:
System call failed with an exit value $exit_val\n"; print "
Let's see what a backtic exec shows us\n"; print '
', `$script_to_call`, ''; } }