[Xitami] cgi form result

Patricko xitami@lists.xitami.org
Sat, 8 Mar 2003 19:12:49 -0700


A bit off topic but you have some reading to do watch the word wrap :)


#!perl
# Xitami see perl then uses the computers path to perl
# you may want to rename it to .pl and not .cgi
use strict;
use CGI;#<----caps
use CGI::Carp "fatalsToBrowser";#<---help debug
my $query = new CGI;# must let CGI.pm know it is being called

print $query->header;  # better form than... print "Content-type: text/html\n\n"
print $query->start_html("Show Me the Animal Form");    #prints all the good
stuff

       print "<h1> Show Me the Animal</h1>\n";

sub do_work {
           print $query->param('animal');

          }

print "Show me the Animal.....";
&do_work;
print $query->end_html;  #end tags



> #the animal.cgi file
>
> #!C:/Perl/bin/perl -wt
> use strict;
> use cgi ':standard';
>
> my $animal;
> $animal = param('animal');
>
> print "content-type: text/html\n\n";
> print "Show me the $animal";