The magazine of the Melbourne PC User Group
Perl Resources -
For the bookshelf
Major Keary |
|
Originally developed for UNIX, Perl is included in Linux distributions
and has been ported to DOS, Microsoft Windows (95/98 and NT/2000/XP), BeOS, Mac,
and even Amiga. Perl is a powerful general-purpose programming language that is
used primarily on textual data, which it can read, transform, process, and
write. Perl can also be used to read from, and write to, binary files. It is
commonly used to automate administrative and backup tasks, and to write CGI
scripts. Perl has an enormous range of applications for which specific modules
have been created by an army of supporters. You see, Perl is free and has been
made extraordinarily versatile by the cooperative efforts of users who have
adapted it to their respective needs, and who have placed the results of their
work in the public domain. They also respond to requests for assistance.
Who Uses Perl?
Amazon, The Federal Reserve Board (USA), Carnegie Mellon University, Oxford
English Dictionary, and Advanced Book Exchange (ABE). If you have not heard of
the Advanced Book Exchange, have a look at http://www.abebooks.com, which is a
Web site that enables users to search a database of used books that are for sale
by hundreds of second-hand book shops. The site originally serviced North
American sellers, but now includes many dealers from Australian, UK, and other
countries. It is so efficient that many dealers don't have their own Web sites,
but simply maintain their own respective databases that are queried from the ABE
server. The advanced search form uses LWP, the details of which are described in
Perl & LWP (see below).
An attraction of Perl is that a novice user can learn just enough to execute
particular tasks. Unlike big-gun programming languages, it is not
necessary to know the whole thing before using it. Given that Perl is free, and
has wide user support, there is every incentive to try it out.
Apart from online resources (newsgroups, mail lists, and CPAN (the Comprehensive
Perl Archive Network) there is a large body of literature, both of a general
nature and covering specialised applications.
Perl for Dummies
Now in its fourth edition covering version 5.8, Perl for Dummies is a
very good introduction for those who have no knowledge of programming. For
anyone who wants to use Perl for a limited and uncomplicated application, this
book is all they may need to find a solution. However, once hooked on Perl the
user will want to explore the language further and Perl for Dummies is a
sound platform for more advanced reading.
The range of coverage is surprisingly wide, as is the technical depth in an
introductory text. The reader is introduced to CGI programming for HTML forms on
web servers and shown how to use Perl "as a gateway to XML and web services".
The book begins with a Getting Started part that explains what Perl does,
how to run it on your computer, the innards of Perl, and example programs. It
then moves on to "Perl Programming Ingredients", which includes a plain language
explanation of basic Perl math operators. More advanced topic are discussed in
Nuts and Bolts of Perl (which includes a tutorial on regular
expressions), and Advanced Perl Demystified (includes using Perl for CGI
scripts, and the libwww-perl library that - amongst many functions - can
"snag pages from the web" that creates a robot capable of getting pages from one
or many sites, or can query a Web page at regular intervals to check for any
changes).
A good introduction for intending users and those who would like to know more
about Perl.
Paul Hoffman:Perl for Dummies 4/e
ISBN0-7645-3750-4
Published by Wiley,
381 pp.,
RRP $52.95 incl. GST |
 |
Elements of Perl
Another text for beginners is Elements of Perl, which I have reviewed
before. It doesn't assume any prior programming experience, but the reader is
expected to be familiar with "basic mathematical concepts and logic". If you are
new to Perl, or even programming in general, and want to develop an in-depth
understanding of Perl, this is highly recommended as an introduction. The
writing and presentation are similar to the O'Reilly style.
Anyone who wants to learn programming in any language should read Elements of
Perl for its lucid discussions of many concepts that are common to
programming at large.
Andrew Johnson: Elements of Programming with
Perl
ISBN 1-884777-80-5
Published by Manning, 352 pp.,
RRP $79.85 incl.GST |
|
The Perl CD Bookshelf
The pre-eminent publisher of Perl texts is O'Reilly, which has the most
extensive list of Perl titles. Amongst those is The Perl CD Bookshelf in
which seven titles have been brought together on a CD, providing a large corpus
that can be searched as a single text.
This collection includes Perl in a Nutshell, a hard copy of which is also
part of the package. Other titles on the CD are: Learning Perl, Programming
Perl, Mastering Perl/Tk, Perl Cookbook, Perl & XML, and Perl & LWP.
Learning Perl is not a raw beginner's guide; that is to say, it is not
designed for someone who has no programing or scripting experience and who, on
the spur of the moment, says, "I'll learn Perl, that's what I'll do". It assumes
some familiarity with programming concepts, but does not call for any special
expertise. This text is ideal for self-teaching, with exercises at the end of
each chapter and answers at the back of the book. It also lends itself to being
used as a class text for courses on Perl.
The Programming volume includes topics such as threading, the Perl
compiler, and Unicode. The print version runs to over a thousand pages and has
been described as the definitive guide. It is intended for programmers, but is
so well written that novices with little knowledge of programming should find it
an interesting read. Anyone with an interest in finding ways to get Unicode
characters into a document should look at Perl; this title includes a chapter
that discusses the subject. A tour de force that goes well beyond simple
programming instructions.
The Cookbook is 750+ pages of solutions for specific problems. In each
instance the format is problem, solution, discussion. Computer generated
random numbers is a contradiction in terms, but within limits the numbers
generated can meet a test of randomness. The book discusses the problem, and
offers three solutions.
The index is comprehensive, but finding what you want is made easier with the
well-organised and detailed table of contents. This is an essential resource for
programmers and good resource for learning Perl in depth.
Perl & LWP is about Web automation. The Library for World Wide Web
in Perl (LWP) "is a set of Perl modules and object-oriented classes for getting
data from the web and for extracting information from HTML". The kind of thing
one can do with LWP is to delete unwanted data from web pages. For example,
suppose there is a need to create plain, unadorned text for pasting into email
from image-rich documents; instead of extracting the text it is easier (given
the right tool) to delete or omit the images and other non-text data. The book
shows how that is done. A related task is to filter a Web document so that it
will display on a lesser device such as a PDA.
Another application is writing user agents (spiders and bots). If you
want to fetch Web pages, parse HTML, extract links, and the like, LWP offers
solutions. Even if you have no immediate interest in doing any of those things,
it offers fascinating insights for the interested reader.
Perl & XML shows how to process XML data using Perl. The
text-based nature of XML lends itself to processing with a language such as Perl,
and Perl has modules that have been written specifically for the purpose.
Mastering Perl/Tk is about a Perl extension for writing programs
with a graphical user interface (GUI) on both UNIX and Win32. The 'Tk' stands
for 'Toolkit', and is an extension to the Tool Command Language (Tcl).
The price of the CD Bookshelf may seem frightening, but the collection of texts
would cost far, far more if purchased as separate titles. For those with a
serious interest in Perl this is a good buy.
The Perl CD Bookshelf
ISBN 0-596-00389-7
Published by O'Reilly,
RRP $275.00 incl. GST |
 |
Other Perl titles from O'Reilly
Programming Web Services with Perl is a text for programmers who have no
experience of Web services. It sets out to teach them about the protocols and
various tools and standards that are essential to Web services. The book
introduces topics such as XML, RPC, SOAP, and UDDI, and explains the relevant
Perl toolkits and their application.
Ray and Kulchenko: Programming Web
Services with Perl
ISBN 0-596-00206-8
Published by O'Reilly,
470 pp.,
RRP $95.00 incl. GST |
 |
Perl Graphics Programming is another programmers' title that focuses on the
creation and manipulation of "images and structured documents with Perl,
allowing you to add graphics, Flash animations, PDF reports, and more to your
programs". It shows how to use The GIMP (the UNIX/Linux answer to Photoshop) and
"how to create PostScript and PDF files for forms and reports". Perl tools can
also be used for conversion between formats.
Perl has several drawing modules, among which is a Perl interface to the ImageMagick C library. It can also be used to create SVG images and introduce
Unicode text into them. For anyone with a serious interest in graphics this book
is well worth reading, even if one has to gloss over the technical bits and
example code. Perl has enormous potential for automating graphics tasks.
Shawn Wallace: Perl Graphics Programming
ISBN 0-596-00219-X
Published by O'Reilly,
462 pp.,
RRP $95.00 incl. GST |
 |
Reprinted from the July 2003 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|