[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sheflug] Help with Perl/CGI



What about making it:

$input - param("input");

Does that help?
James


-----Original Message-----
From: shef-lug-admin [at] list.sheflug.org.uk
[mailto:shef-lug-admin [at] list.sheflug.org.uk] On Behalf Of Steve Tickle
Sent: 23 October 2002 15:52
To: shef-lug [at] list.sheflug.org.uk
Subject: [Sheflug] Help with Perl/CGI


I'm trying to write a simple little CGI script in perl and am having
trouble 
with the param() command. I have CGI.pm v2.88 and perl v5.6.1 installed.

When I check for correct syntax and operation using perl -P I get the 
following 
steve@linux2:~/public_html> perl -P cgi-bin/test.cgi
Undefined subroutine &main::param called at cgi-bin/test.cgi line 6.

My perl script is below

#!/usr/bin/perl;

my $input;

$input = param('input');

print "Content-type: text/html\n\n";
print "You typed '$input'\n";

If I replace $input = param('input'); with $input = 'Hello World';
everything 
works OK so it's definitely a problem with the param() command.

Anyone any ideas?
-- 
Steve Tickle
___________________________________________________________________

Sheffield Linux User's Group - http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.