Jump to content
  • Advertisement
Sign in to follow this  
Lucidquiet

[web] Uh perl cgi stuff

This topic is 5398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In perl cgi, if I use this: web->param("1"); #and param 1 is not in the parameter list #what is actually getting returned ? I'm pretty new to perl, and I'm not even sure there is a null value in perl. Though I think it might have something to do with <>, but I'm not sure. Help please, L-

Share this post


Link to post
Share on other sites
Advertisement
Guest Medulla_Oblongata
I suppose you want to get parameters from an URL?
If so, param will return the value of 1 from the url.
For example:

you have the url http://www.someplace.com/somepage.php?1=thevalueof1

Here param will return "thevalueof1"

Share this post


Link to post
Share on other sites
It should return an empty string.

So...

my $one = web->param("1");

if ($one eq "")
{ print "No 1 parameter was passed\n
";
}
else
{ print "Parameter 1 = $one\n
";
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!