#!/usr/local/bin/perl -T # CGI script: skeleton.pl # unbuffer output so that we can see it as it comes # out, rather than waiting for buffers to flush $| = 1; $ENV{'PATH'}="/bin:/usr/bin:/usr/ucb"; use CGI; $query = new CGI; print $query->header; print $query->start_html('Skeleton Script'); unless ($query->param) { &print_prompt($query); } else { &do_work($query); } &print_signature; print $query->end_html; # --------------------- subroutines -------------------- # print the prompt sub print_prompt { my ($query) = @_; print "
"; print $query->submit; print $query->end_form; } # do the processing sub do_work { my($query)=@_; print "The parameters were $query\n"; print "
Your code here!\n";
}
# print a canned signature.
sub print_signature {
print < Last modified: April 28, 1996
Home Page
END
;
}