Perl in a Nutshell

( 2 )

Overview

This complete guide to the Perl programming language ranges widely through the Perl programmer's universe, gathering together in a convenient form a wealth of information about Perl itself and its application to CGI scripts, XML processing, network programming, database interaction, and graphical user interfaces. The book is an ideal reference for experienced Perl programmers and beginners alike.

With more than a million dedicated programmers, Perl is proving to be the best ...

See more details below
Paperback (Second Edition)
$26.60
BN.com price
(Save 33%)$39.95 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (30) from $1.99   
  • New (10) from $10.48   
  • Used (20) from $1.99   
Perl in a Nutshell

Available on NOOK devices and apps  
  • Nook Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.59
BN.com price
(Save 45%)$31.99 List Price

Overview

This complete guide to the Perl programming language ranges widely through the Perl programmer's universe, gathering together in a convenient form a wealth of information about Perl itself and its application to CGI scripts, XML processing, network programming, database interaction, and graphical user interfaces. The book is an ideal reference for experienced Perl programmers and beginners alike.

With more than a million dedicated programmers, Perl is proving to be the best language for the latest trends in computing and business, including network programming and the ability to create and manage web sites. It's a language that every Unix system administrator and serious web developer needs to know. In the past few years, Perl has found its way into complex web applications of multinational banks, the U.S. Federal Reserve, and hundreds of large corporations.

In this second edition, Perl in a Nutshell has been expanded to include coverage of Perl 5.8, with information on Unicode processing in Perl, new functions and modules that have been added to the core language, and up-to-date details on running Perl on the Win32 platform. The book also covers Perl modules for recent technologies such as XML and SOAP.

Here are just some of the topics contained in this book:

  • Basic Perl reference
  • Quick reference to built-in functions and standard modules
  • CGI.pm and mod_perl
  • XML::* modules
  • DBI, the database-independent API for Perl
  • Sockets programming
  • LWP, the library for Web programming in Perl
  • Network programming with the Net modules
  • Perl/Tk, the Tk extension to Perl for graphical interfaces
  • Modules for interfacing with Win32 systems

As part of the successful "in a Nutshell" book series from O'Reilly & Associates, Perl in a Nutshell is for readers who want a single reference for all their needs.

"In a nutshell, Perl is designed to make the easy jobs easy, without making the hard jobs impossible."

— Larry Wall, creator of Perl


This excellent desktop reference provides quick and detailed information on the Perl language. It covers modules, provides cross-platform implementation and includes a concise Perl language and module reference. For best understanding, you should be comfortable using the Perl scripting language.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Perl and O’Reilly go together like peanut butter and jelly. Perl’s creator, Larry Wall, even works there, guiding the future of the language. Then, of course, there’s O’Reilly’s “camel book,” Programming Perl, one of the world’s few truly legendary computer books. So if you’re looking for an authoritative Perl language reference, you’d expect O’Reilly to offer a great one. And they do.

Perl in a Nutshell, Second Edition combines a complete overview of working with Perl and a thorough reference. If you’ve fooled with Perl (or even another scripting language) even a little, the book’s introductory tutorials will be all you’ll need to move forward. If you’re an experienced Perlmonger, they’re a perfect refresher.

It’s all here, from installation through debugging and Win32 support. The heart of the book: coverage of Perl modules that extend the language in virtually every imaginable direction. Perl in a Nutshell, Second Edition covers virtually all the most widely used modules in the most popular areas of Perl development: CGI.pm, mod_perl for Apache, DBI for connecting with your friendly neighborhood database; new tools for XML and SOAP processing; network, web, and email programming modules; and more. It’s an immense, well-organized resource for every Perl developer. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780596002411
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 6/1/2002
  • Series: In a Nutshell (O'Reilly) Series
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 768
  • Sales rank: 628,127
  • Product dimensions: 6.04 (w) x 9.00 (h) x 1.39 (d)

Meet the Author

Nathan Patwardhan is an active Perl Monger and has extensive experience in system administration and application development for web based corporations. He is also the co-author of the first edition of Perl in a Nutshell and Programming with Perl Modules (distributed with the O'Reilly Perl Resource Kit).

Ellen Siever is a writer and editor specializing in Linux and other open source topics. In addition to Linux in a Nutshell, she coauthored Perl in a Nutshell. She is a long-time Linux and Unix user, and was a programmer for many years until she decided that writing about computers was more fun.

Stephen Spainhour co-authored Webmaster in a Nutshell, Perl in a Nutshell, 1st Edition, and contributed to many other OReilly titles. He is an avid fan of professional tennis, and when hes not checking for tennis scores on the Web, he enjoys cooking, electronic music, troubleshooting his home-built PC, and watching too much television.

Read More Show Less

Read an Excerpt


Chapter 2: Installing Perl The CPAN Architecture

CPAN represents the development interests of a cross-section of the Perl community. It contains Perl utilities, modules, documentation, and (of course) the Perl distribution itself CPAN was created by Jarkko Hietaniemi and Andreas Ming.

The home system for CPAN is funet.fi, but CPAN is also mirrored on many other sites around the globe. This ensures that anyone with an Internet connection can have reliable access to CPAN's contents at any time. Since the structure of all CPAN sites is the same, a user searching for the current version of, Perl. can be sure that the latest.tar.gz file is the same on every site.

The easiest way to access CPAN is to utilize the CPAN multiplex service at www.perl.com. The multiplexor tries to connect you to a local, fast machine on a large bandwidth hub. To use the multiplexor, go to http://www.perl.com/CPAN the multiplexor will, automatically route you to a site based on your domain.

If you prefer, you can choose a particular CPAN site, instead of letting the multiplexor choose one for you. To do that, go to the URL http://www.perl.com/CPAN (no wailing slash). When you omit the trailing slash, the CPAN multiplexor presents a menu of CPAN mirrors from which you select the one you want. It remembers your choice next time.

To get the current Perl distribution, click on latest.tar.gz. For ports to other systems, click on ports. The modules link is the one, you want if you're looking for a Perl module- from there you can get a full list of the modules, or you can access the modules directly by author, by CPAN category, or by module. (The section "Getting and Installing Modules" later in this chapter talks about installing modules. Click on doc for Perl documentation, FAQs, etc.

Installing Perl

Most likely your system administrator is responsible for installing and upgrading Perl. But if you are the system administrator, or you want to install Perl on your own system, sooner or later you will find yourself. installing a new version of Perl.

If you have been running Perl, and you are now going to install Perl 5.005, you need to be aware that it 'is not binary compatible with older versions. This means that you must rebuild and reinstall any dynamically loaded extensions that you built under earlier versions.

Specific installation instructions come in the README and 17VSTALL files of the Perl distribution kit. If. you don't already have the Perl distribution, you can download it from CPAN-the latest Unix distribution is in latest.tar.gz. The information in this section is an overview of the installation process. The gory details are in the INSTALL file, which you should look at before starting, especially if you haven't done an installation before. Note that operating systems other than Unix may have special instructions; if so, follow those instructions instead of what's in this section or in INSTALL Look for a file named READMExxx, where xxx is your OS name.

In addition to Perl itself, the standard distribution includes a set of core modules that are automatically installed with Perl. See the "Getting and Installing Modules" section later in this chapter for how to install modules that are not bundled with Perl; Chapter 8, Standard Modules, describes the standard modules in, some detail.

Installing on Unix

Typically, you'll get the Perl kit packed as either a tar file or as a set of shar (shell archive) scripts; in either case, the file will be in a compressed format. if you got your version of Perl directly from CPAN, it is probably in "tar-gzipped," format; tar and gzip are popular Unix data-archiving formats. In any case, once you've downloaded the distribution, you need to uncompress and unpack it. The filename indicates what kind of compression was used. A Z extension indicates you need to uncompress the file first, while a gz extension indicates you need to gunzip the file. You then unpack the file as appropriate, read the README and INSTALL files, and run a massive shell script called Configure, which tries to figure out everything about your system and creates the file Config.pm to store the information. After this is done, you do a series of "makes" to find header file dependencies, to compile Perl (and a2p, which translates awk scripts to Perl), to run regression tests, and to install Perl in your system directories.

One common problem is not making sure that Perl is linked against all the libraries it needs to build correctly. Also, you should say "yes" when Configure asks if you want dynamic loading, if your system supports it. Otherwise, you won't be able to install modules that use XS, which provides an interface between Perl and C.

If you are running Linux, some Linux distributions might not include a complete MakeMaker, which you need for installing modules. To be safe, you should make sure everything is there; one Way to do that is to check the Config.pm file. If MakeMaker is not correctly installed, you might need to build Perl yourself.

It's possible you'll get a compiled (binary) copy of Perl, rather than the source. in that case, make sure you get suidperl, a2p, s2p, and the Perl library routines. Install these files in the directories that your version was compiled for. Note that binary distributions of Perl are made available because they're handy, not because you are restricted from getting the source and compiling it yourself. The people who give you the binary distribution ought to provide you with some form of access to the source, if only a pointer to where they got the source. See the Copying file in the distribution for more information.

Perl examples

The Perl source distribution comes with some sample scripts in the eg/ subdirectory. Feel free to browse among them and use them. They are not installed automatically, however, so you need to copy them to the appropriate directory and possibly fix the #1 line to point to the right interpreter.

The files in the. t/ and lib/ subdirectories, although arcane in spots, can also serve as examples.

Patches

Since Perl is constantly being honed and improved, patches are sometimes made available through CPAN. Your distribution is likely to have had most of the patches applied already-run perl -v to check the patch level of your distribution. Patches are sent out with complete instructions on how to apply them using patch, which is available from the GNU project.

Installing on Win32

You need to obtain and install a copy of Perl yourself, unless you have had the good fortune of having a system administrator install Perl on your system.

For Perl 5.004, there are two different distributions for Win32 systems. The first is Perl for Win32, which was developed by ActiveState Tool Corporation. The second is actually the standard Perl distribution-Perl 5.004 added support for Win32 systems to the standard Perl distribution. In Perl 5.004, the two versions are largely compatible, with some of the Perl 5.004, code being based on the ActiveState port. However, there are also some differences: using either the ISAPI version of Perl or PerlScript with 5.004 requires the ActiveState distribution. On the other hand, the Win32 ports of mod_perl or Perl/Tk require the "native" (or standard) version of 5.004.

With Perl 5.005, this scenario has changed, and the two versions have been merged. if you look on CPAN, you'll see that there still seem to be two versions the ActiveState distribution, now known as ActivePerl, an& the standard distribution. The difference is that they are now based on the same source code. Get ActivePerl if you want to install from a binary distribution or get the standard distribution to build Perl from the source code.

ActivePerl

The canonical source for the ActivePerl distribution at the time of this writing is at http://www.activestate.com. Included in the distribution are:
  • Perl for Win32
  • Binary for the core Perl distribution
  • Perl for ISAPI
  • IIS plug-in for use with ISAPI-compliant web servers
  • PerlScript
  • ActiveX scripting engine
  • Perl Package Manager

Manager for Perl modules and extensions

The ActivePerl binary comes as a self-extracting executable that uses the standard Win32 InstallShield setup wizard to guide you through the installation process. By default, Perl is installed into the directory C:\perl\version, where version is the current version number (e.g., 5.005). Unless you choose to customize your setup, the default installation does not modify your registry other than to add an entry so you can uninstall Perl. For information on customizing your installation, see the Win32 FAQ on the ActiveState web site. The installation also associates the We extension .pl with Perl and adds the directory into which you installed Perl to your PATH environment variable.

Standard Perl distribution

The standard Perl distribution is available from, CPAN, where you'll find binary and source distributions for Perl 5.004 for both Windows NT and Windows 95, and the source distribution for Perl 5.005. You can get the binary for Perl 5.004 as either a .tar.gz file or a zip file. The source distributions come as targz files, which you can extract using a. utility that -supports gzip files, tar files, and long filenames. Ports of both GNU gzip and tar are available for the various Win32 platforms, or you can use a graphical zip archive program such as WinZip. Make sure you preserve the directory structure when you unpack the distribution. . . .
Read More Show Less

Table of Contents

PrefacePart I: Getting StartedChapter 1: Introduction to PerlChapter 2: Installing PerlPart II: Language BasicsChapter 3: The Perl ExecutableChapter 4: The Perl LanguageChapter 5: Function ReferenceChapter 6: DebuggingPart III: ModulesChapter 7: Packages, Modules, and ObjectsChapter 8: Standard ModulesPart IV: CGIChapter 9: CGI OverviewChapter 10: The CGI.pm ModuleChapter 11: Web Server Programming with mod_perlPart V: DatabasesChapter 12: Databases and PerlPart VI: XML and SOAPChapter 13: XML and PerlChapter 14: SOAPPart VII: Network ProgrammingChapter 15: SocketsChapter 16: Email ConnectivityChapter 17: Usenet NewsChapter 18: FTPChapter 19: Lightweight Directory Access with Net::LDAPPart VIII: LWPChapter 20: The LWP LibraryPart IX: Perl/TkChapter 21: Perl/TkPart X: Win32Chapter 22: Win32 Modules and ExtensionsChapter 23: OLE AutomationChapter 24: ODBC Extension for Win32Colophon

Read More Show Less

Customer Reviews

Average Rating 5
( 2 )
Rating Distribution

5 Star

(2)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted March 29, 2011

    No text was provided for this review.

  • Anonymous

    Posted November 14, 2011

    No text was provided for this review.

Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)