CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
param function reports error

 



HTTP404
Deleted

Mar 17, 2001, 2:38 AM

Post #1 of 4 (148 views)
param function reports error Can't Post

use CGI;
$mail=param('mail');

wierd i have ActiveState Perl i'm on windows and it gives me error msg saying:

undefined subroutine called at &main::param

same with when i use

print start_html ("Perl Rocks");

thnx very much in advance







unknownSym
stranger

Mar 17, 2001, 6:00 AM

Post #2 of 4 (144 views)
Re: param function reports error [In reply to] Can't Post

You need to import those subroutines into the 'main' package like this:

use CGI qw(:all)

The above line imports all of the CGI packages subroutines in the 'main' package.

If you don't use the above line then your need to call the subroutines like this

CGI->param(parametername)
CGi->start_html(string)

OR

$cgi = new CGI
$cgi->param(paramname)
$cgi->start_html(string)

Have fun

--unknownSym



HTTP404
Deleted

Mar 17, 2001, 6:20 AM

Post #3 of 4 (143 views)
Re: param function reports error [In reply to] Can't Post

thnx m8



HTTP404
Deleted

Mar 17, 2001, 6:35 AM

Post #4 of 4 (142 views)
Re: param function reports error [In reply to] Can't Post

thnx works very sweet + OOP


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives