Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: passing and using param

by moxliukas (Curate)
on Oct 06, 2002 at 23:16 UTC ( #203222=note: print w/ replies, xml ) Need Help??


in reply to passing and using param

Well, I think you forgot use CGI;

Your code would look (untested):

#!/usr/bin/perl -w use strict; use CGI qw/:standard/; print header; my $myvalue = param("test"); print <<EOS; <BODY BGCOLOR=#FFFFFF> <CENTER> myvalue: $myvalue </CENTER> </BODY></HTML> EOS

Note that I have replaced a bunch of your print statements by using a HEREDOC syntax. Of course, you can do it with a few prints, but it very much neater this way. Oh, and you might want to use built in CGI functions for generating HTML.. For all your CGI needs, consult CGI manual.

...And don't forget to use strict ;)


Comment on Re: passing and using param
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203222]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-11-29 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls