Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Variable Substitution within NameSpace

by dsb (Chaplain)
on Aug 03, 2004 at 18:04 UTC ( #379769=note: print w/ replies, xml ) Need Help??


in reply to Variable Substitution within NameSpace

If I'm understanding you correctly, you want to pass form values. Fine. CGI.pm has methods suitable for doing that in a much neater way than what you are attempting. The param() function is the one you want.

<input type="text" name="custtype" value="whatever'>
So you've got that form element. Once you've submitted, call the param() function and bind that element to a variable in the script you call in the action attribute of your form definition.
my $q = CGI->new(); my $cust = $q->param('custtype');
param() examines the query string submitted to by your form and pulls the values out of that. In this case $cust would hold the value 'whatever'.


dsb
This @ISA my cool %SIG


Comment on Re: Variable Substitution within NameSpace
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-07-23 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (149 votes), past polls