
Cure
User
Apr 5, 2000, 2:41 PM
Post #5 of 6
(2438 views)
|
Hi use CGI qw/:standard/; => The use operator loads the CGI.pm definitions and imports the ":standard" set of function definitions. :cgi These are all the tags that support one feature or another of the CGI protocol, including param(), path_info(), cookie(), request_method(), header() and the like. Function-Oriented vs Object-Oriented Use CGI.pm can be used in two distinct modes called function-oriented and object-oriented. In the function-oriented mode, you first import CGI functions into your script's namespace, then call these functions directly. So, I would recommend that you use Object-Oriented than Function Oriented because the Function Oriented has to import the "standard function into your cgu-script(namespace) which will take longer to compile and The object-oriented mode also has the advantage of consuming somewhat less memory than the function-oriented coding style. Example of Object Oriented. #!/usr/local/bin/perl use CGI; $q = new CGI; $cure= $q->param('name'); print $cure; ######################## Now to go over why your getting errors: Example. Lets say you have a directory called cure and you want your script to create a file called perl.txt for you then you need to set the PERMISSION on the cure directory to 777 If you manual created the file perl.txt in the cure directory then you need to set the PERMISSION to 755 on the cure directory. Cure
|