I'm looking for a Perl Book... I think.

T

Tad J McClellan

Ben Bullock said:
and the syntax "$q->param" is the
same as "param($q)".


No it isn't.

(and you do not need to know anything about a method's special
first argument in order to use an object oriented module.
You need to know that if you are going to _write_ an OO module.
)


-------------------------
#!/usr/bin/perl
use warnings;
use strict;

package Q;
sub new { bless {}, 'Q' }
sub param { print $_[0], "\n" }

package main;

my $q = Q->new();

$q->param();

Q::param($q);

param($q);
 
G

Gunnar Hjalmarsson

Ben said:
You don't need a 'server'. You just need a computer: the one you're
posting from will probably do fine. If it's running Win32, you can get
perl from strawberryperl.com; if it's a Mac, you've almost certainly got
perl installed already. If it's running something else, let us know and
we'll see if anyone knows how to get perl installed on it.

While installing a local webserver can be useful for testing websites,
CGI.pm has a useful 'testing' mode when a program using it is run from
the command line.

Even if that is true, access to a local web server is the better way to
test CGI scripts before uploading them. And, assuming Windows, it's very
easy to install all you need (and more):

http://www.indigostar.com/indigoampp.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top