RE: Perl Programming within Debian
- From: "David Christensen" <dpchrist@xxxxxxxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 10:04:58 -0800
rocky wrote:
I'm thinking of learning Perl Programming.
Get this book first, read it, and do all of the exercises:
http://www.oreilly.com/catalog/learnperl4/index.html
After that, get these books as references:
http://www.oreilly.com/catalog/pperl3/index.html
http://www.oreilly.com/catalog/perlckbk2/index.html
For CGI scripting, this is the classic:
http://www.wiley.com/legacy/compbooks/stein/
but it is dated. I'm working through it and writing updated scripts:
http://apache.holgerdanske.com/cgi-pm-book/
I have some others, but haven't studied them in a while.
Can any of you help me get started on how to programming Perl in
Debian?
Install these Debian packages (as root):
# apt-get perl-doc
# apt-get perlindex
Then use the perlindex program to browse the documentation (as a user):
$ perlindex learn
I mean what is the file extension for the perl? Is it .cgi?
For command-line scripts, I don't use any extension so that they are
invoked just like any other command-line program.
For CGI scripts, I use .cgi for CGI scripts that run in the traditional
CGI way and .pl for CGI scripts run with mod_perl Apache::Registry
acceleration (the later is 10x faster, but there are subtle differences
that break some scripts and I haven't figure out all the details yet).
Do I need to use any compiler for perl? what is the best choice?
A standard Debian installation includes the Perl interpreter:
2006-12-30 09:32:09 dpchrist@p3600 ~
$ perl -v
This is perl, v5.8.4 built for i386-linux-thread-multi
...
which includes the Perl debugger (-d command line option).
How can I test my work(For instance in PHP programming I can use
Firefox browse to the file I want to see the output)?
For command-line scripts, you can run them from the command line with or
without the debugger.
For CGI scripts, you can run them as above and/or have your web server
run them. The web server can either call the command-line Perl
interpreter, load a Perl interpreter module (mod_perl), or have a Perl
interpreter already compiled in. I prefer the last choice:
apt-get apache-perl
I was trying to search on the net and it did give me lots of results.
Yup. I'd recommend starting here:
http://www.perl.org/
FYI the best place for asking Perl language questions is the usenet
newsgroup:
comp.lang.perl.misc
and for Perl CGI questions:
comp.infosystems.www.authoring.cgi
HTH,
David
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- Perl Programming within Debian
- From: rocky
- Perl Programming within Debian
- Prev by Date: Re: Perl Programming within Debian
- Next by Date: Re: GUI and USB question
- Previous by thread: Perl Programming within Debian
- Next by thread: Re: Perl Programming within Debian
- Index(es):
Relevant Pages
- Re: CGI python use "under a curse"
... KeyError: 'essay' ... perl -p python1.cgi ... PLease fix syntax
error so it will work fine. ... Perl to test just any old CGI scripts. ... (comp.lang.python) - Re: CGI python use "under a curse"
... Perl to test just any old CGI scripts. ... which parses python.
... I am no longer a customer and do not stand to gain by this recommendation, but they
are a small business that were very helpful to me when I *was* a customer. ... (comp.lang.python) - Re: Need help with CGI/ DBI error (permissions?)
... >> My other Perl CGI scripts that don't use DBI run OK, ... > able
to telepathically decipher your web server configuration, ... problems with serving up
*Perl* pages. ... you just said that your other CGI scripts run fine. ...
(comp.lang.perl.misc) - Re: cgi invoked .bat script cant access network drives!
... [snip stuff about user IDs and permssions wrt CGI scripts run from ... IIS]
... Such questions should not be posted to newsgroups that deal with the ... Perl
programming language as they will be unwellcome there. ... (comp.lang.perl) - Re: Web Server on Embedded System
... the usual method for web servers to invoke CGI scripts is by running ...
are written in Perl, so a perl interpreter gets invoked to interpret ... (comp.os.linux.embedded)