Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: passing and using param

by moxliukas (Curate)
on Oct 06, 2002 at 23:16 UTC ( [id://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 ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found