in reply to Re: Help... I know nothing about perl...
in thread Help... I know nothing about perl...

When you are using CGI in OO form,you should use CGI; and not use CGI qw(:standard);.

I recommend that you just import the functions in and use them

#!/usr/bin/perl use CGI qw(:standard); use strict; my $name = param('name'); print header(); if ($name) { print "Welcome " . $name }

Replies are listed 'Best First'.
Re: Re: Re: Help... I know nothing about perl...
by Roninpc (Initiate) on May 01, 2001 at 21:59 UTC
    Thanks, OK, so do I place the function in my current form handeler? (I am embarrassed that I am asking for help and do not even know where to start).

      No, it replaces your current form handler. Of course you'll need to expand it to output more of a document.

      #!/usr/bin/perl use CGI; my $q = new CGI; print $q->header; # HTTP header # Note: the $name and 'name' equivalence is arbitrary. my $name = $q->param('name') || "Anonymous"; print <<ENDOFPAGE; <html><head><title>Thank you, $name!</title></head><body> <p>$name, I want to personally thank you for making world peace possible!</p> <p>$name, if you print this page, and glue it onto your forehead, you'll never need to pay for anything again! You'll even get a free shirt with long sleeves and a ride to a big building where they'll put you in a comfy room with padded walls!</p> </body></html> ENDOFPAGE # That ENDOFPAGE must be on its own line!