#!/bin/perl $webmaster="webmaster\@mycompany.com"; # # Execute shell script and capture returned string # $return_string = `/usr/local/robelle/sx_simple.script`; # # Return string can be OK=html filename # failed=log filename # Split return string's 2 components # ($status_word, $html_file) = split (/=/, $return_string); if ($status_word eq "failed") { &error_page } else { print "Location: http://www.robelle.com/~httpdusr/$html_file", "\n\n"; } # Format an error message for the user sub error_page { print "Content-type: text/html\n\n"; print "\n"; print "\n"; print "Comment Form Error\n"; print "\n"; print "\n"; print "

Comment Form Error

\n"; print "
\n"; print "

\n"; print "Form input was not proccessed. Please mail your "; print "remarks to $webmaster"; print "

\n"; print "Content of the Suprtool/STExport logfile"; print "

";
    print `cat $html_file`, "\n";
    print "
", "\n"; print "\n"; print "\n"; }