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

[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.