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 ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-28 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found