On 7/1/07, hOURS <[EMAIL PROTECTED]> wrote:
I read of a perl function called param, which is part of the CGI.pm perl library. The first simple program I wrote trying to use it didn't work though. At first I thought the ISP hosting my site didn't provide this library, but I was able to use other commands from it such as: print start_html;
Sometimes it's difficult to debug what's in your CGI environment. That's what Inside is for: http://search.cpan.org/~phoenix/Inside-1.01/
I tried perldoc -f param and got nothing.
Since the function comes from the module, it's documented in the module: perldoc CGI
#!/usr/local/bin/perl use CGI ':standard'; print "Content-type: text/html\n\n"; $value = param('myvalue'); print ("The value = $value");
Maybe that code doesn't work for you because you're not printing HTML, like your header claims you are. You could change the type in the header to 'text/plain', or you could change the output section. Have you tried running it from the command line? Doing that is described in the CGI module's documentation. Also, of course, the usual admonitions to 'use strict', 'use warnings', and so on. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/