For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > September 2004 > Error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Error
Flak

2004-09-04, 6:52 pm

I have a problem with a CGI script I'm using.


I keep on getting an error message.
It's (of course) my first time and I have no idea what's wrong with it.


I've got a textbox with a NAME attribute of "text".
I'm trying to use the "print" function to display the text to the cgi page.

Here's the script:

--------------------------------------
#!/usr/local/bin/perl

$text = param('text');

print "Content-type: text/html\n\n";
print "$text";
--------------------------------------

Here's the error message:

--------------------------------------
Undefined subroutine &main::param called at text.pl line 3.
--------------------------------------



Could someone tell me what this is, what is wrong, and how to fix it?

PS. PLEASE Help!!!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com