[Nottingham] Perl

Duncan John Fyfe djf at star.le.ac.uk
Tue Jan 8 12:43:58 GMT 2008


On Tue, 2008-01-08 at 10:47 +0000, Joshua Lock wrote:

> I just found a (1st edition) copy of the (pink!?!) camel book lying
> around at work which I'm going to borrow for a while to work through
> the basics. The problem is it doesn't seem to have anything about cgi
> in it. Does anyone have any pointers on tutorials for perl cgi? Or is
> the idea that by the time I've finished with the camel book I'll be
> competent enough to suss cgi out with perldoc???
> 

If you are an experienced programmer it shouldn't take you long to pick
up the core elements of perl.

Step 1:
Start with (or an equivalent):

promtp> cat > helloworld
#!/usr/bin/perl
print "Hello, World!\n";
^D
chmod u+x helloworld
./helloworld

Now you have a skeleton program working you can start working through
perlintro.  Once you have been through this tutorial and are happy
writing simple perl programs you should be able to follow enough of what
is in "perldoc CGI" to get started.  Get perl+webserver working together
(use the script at the top of perldoc CGI as a test) and start playing
and don't be afraid to shout when it all goes wrong.

NB. Object oriented perl is fun but the CGI module allows you to do most
things in a non-object oriented way.  This is a good thing for starters
because OO perl can demand a more in-depth understanding of perl (which
will come with time).  To assist in this I recommend the various perl OO
turorials,  Damian Conway's "Object Oriented Perl" and perl design
patterns (install Object::PerlDesignPatterns from www.cpan.org).

Have fun,
Duncan
> Thanks!





More information about the Nottingham mailing list