Perl Monk, Perl Meditation | |
PerlMonks |
Re: Problems with scriptsby arturo (Vicar) |
on Nov 27, 2000 at 02:47 UTC ( [id://43412]=note: print w/replies, xml ) | Need Help?? |
First: if you're using the OO interface, you don't need to import anything (which is what your qw(param standard) is supposed to do) (explanation: the list of names you pass the module when you use it tells it that it is to "export" a number of functions into the calling package's namespace; so you can call (e.g.)"param" function without prepending "CGI::" to it. The OO interface makes all those functions methods of the query object, and so there's no need to *import* them). the "uninitialized" problem in line 20 occurs because, evidently, no paramter named "place" is being passed to the script. Have you tried it from the command line (add "place=links" or some such when you run it. CTRL-D will end the input of name-value pairs) The solution to a problem like this is usually something like:
Second pointer: CGI.pm can handle arrays, as I found out some time ago by asking on this very site. (link to follow => Passing arrays to a CGI read Fastolfe's post ). The basic idea here is that you put any number of fields with the same name in your HTML form, and CGI will return them as an array if you request it as such, i.e. will store all the returned fields named 'text' into the array. HTH for a start. Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In Section
Seekers of Perl Wisdom
|
|