Buying Options
Learning Perl, Second Edition
Safari Books Online
Add to Cart
What is this?

Product Editions

Please consider the latest edition.

  1. Learning Perl, Fifth Edition - June 2008
  2. Learning Perl, Fourth Edition - July 2005
  3. Learning Perl, Third Edition - July 2001
  4. Learning Perl, Second Edition - July 1997
  5. Learning Perl - November 1993 (out of print)
Description
In this update of a bestseller, two leading Perl trainers teach you to use the most universal scripting language in the age of the World Wide Web. Current for Perl version 5.004, this hands-on tutorial includes a lengthy chapter on CGI programming, while touching also on the use of library modules, references, and Perl's object-oriented constructs.
Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. History of Perl

    2. Purpose of Perl

    3. Availability

    4. Basic Concepts

    5. A Stroll Through Perl

    6. Exercise

  2. Chapter 2 Scalar Data

    1. What Is Scalar Data?

    2. Numbers

    3. Strings

    4. Scalar Operators

    5. Scalar Variables

    6. Scalar Operators and Functions

    7. <STDIN> as a Scalar Value

    8. Output with print

    9. The Undefined Value

    10. Exercises

  3. Chapter 3 Arrays and List Data

    1. What Is a List or Array?

    2. Literal Representation

    3. Variables

    4. Array Operators and Functions

    5. Scalar and List Context

    6. <STDIN> as an Array

    7. Variable Interpolation of Arrays

    8. Exercises

  4. Chapter 4 Control Structures

    1. Statement Blocks

    2. The if/unless Statement

    3. The while/until Statement

    4. The for Statement

    5. The foreach Statement

    6. Exercises

  5. Chapter 5 Hashes

    1. What Is a Hash?

    2. Hash Variables

    3. Literal Representation of a Hash

    4. Hash Functions

    5. Hash Slices

    6. Exercises

  6. Chapter 6 Basic I/O

    1. Input from STDIN

    2. Input from the Diamond Operator

    3. Output to STDOUT

    4. Exercises

  7. Chapter 7 Regular Expressions

    1. Concepts About Regular Expressions

    2. Simple Uses of Regular Expressions

    3. Patterns

    4. More on the Matching Operator

    5. Substitutions

    6. The split and join Functions

    7. Exercises

  8. Chapter 8 Functions

    1. Defining a User Function

    2. Invoking a User Function

    3. Return Values

    4. Arguments

    5. Private Variables in Functions

    6. Semiprivate Variables Using local

    7. File-Level my( ) Variables

    8. Exercises

  9. Chapter 9 Miscellaneous Control Structures

    1. The last Statement

    2. The next Statement

    3. The redo Statement

    4. Labeled Blocks

    5. Expression Modifiers

    6. && and || as Control Structures

    7. Exercises

  10. Chapter 10 Filehandles and File Tests

    1. What Is a Filehandle?

    2. Opening and Closing a Filehandle

    3. A Slight Diversion: die

    4. Using Filehandles

    5. The -x File Tests

    6. The stat and lstat Functions

    7. Exercises

  11. Chapter 11 Formats

    1. What Is a Format?

    2. Defining a Format

    3. Invoking a Format

    4. More About the Fieldholders

    5. The Top-of-Page Format

    6. Changing Defaults for Formats

    7. Exercises

  12. Chapter 12 Directory Access

    1. Moving Around the Directory Tree

    2. Globbing

    3. Directory Handles

    4. Opening and Closing a Directory Handle

    5. Reading a Directory Handle

    6. Exercises

  13. Chapter 13 File and Directory Manipulation

    1. Removing a File

    2. Renaming a File

    3. Creating Alternate Names for a File: Linking

    4. Making and Removing Directories

    5. Modifying Permissions

    6. Modifying Ownership

    7. Modifying Timestamps

    8. Exercises

  14. Chapter 14 Process Management

    1. Using system and exec

    2. Using Backquotes

    3. Using Processes as Filehandles

    4. Using fork

    5. Summary of Process Operations

    6. Sending and Receiving Signals

    7. Exercises

  15. Chapter 15 Other Data Transformation

    1. Finding a Substring

    2. Extracting and Replacing a Substring

    3. Formatting Data with sprintf( )

    4. Advanced Sorting

    5. Transliteration

    6. Exercises

  16. Chapter 16 System Database Access

    1. Getting Password and Group Information

    2. Packing and Unpacking Binary Data

    3. Getting Network Information

    4. Exercise

  17. Chapter 17 User Database Manipulation

    1. DBM Databases and DBM Hashes

    2. Opening and Closing DBM Hashes

    3. Using a DBM Hash

    4. Fixed-Length Random Access Databases

    5. Variable-Length ( Text) Databases

    6. Exercises

  18. Chapter 18 Converting Other Languages to Perl

    1. Converting awk Programs to Perl

    2. Converting sed Programs to Perl

    3. Converting Shell Programs to Perl

    4. Exercise

  19. Chapter 19 CGI Programming

    1. The CGI.pm Module

    2. Your CGI Program in Context

    3. Simplest CGI Program

    4. Passing Parameters via CGI

    5. Less Typing

    6. Form Generation

    7. Other Form Elements

    8. Creating a Guestbook Program

    9. Troubleshooting CGI Programs

    10. Perl and the Web: Beyond CGI Programming

    11. Further Reading

    12. Exercises

  1. Appendix A Exercise Answers

    1. Chapter 2

    2. Chapter 3

    3. Chapter 4

    4. Chapter 5

    5. Chapter 6

    6. Chapter 7

    7. Chapter 8

    8. Chapter 9

    9. Chapter 10

    10. Chapter 11

    11. Chapter 12

    12. Chapter 13

    13. Chapter 14

    14. Chapter 15

    15. Chapter 16

    16. Chapter 17

    17. Chapter 18

    18. Chapter 19

  2. Appendix B Libraries and Modules

    1. Library Terminology

    2. Standard Modules

    3. CPAN: Beyond the Standard Library

  3. Appendix C Networking Clients

    1. A Simple Client

    2. A Webget Client

    3. An Interactive Client

    4. Further Reading on Networking

  4. Appendix D Topics We Didn't Mention

    1. Full Interprocess Communications

    2. The Debugger

    3. The Command Line

    4. Other Operators

    5. Many, Many More Functions

    6. Many, Many Predefined Variables

    7. Symbol Table Manipulation with *FRED

    8. Additional Regular-Expression Features

    9. Packages

    10. Embeddible, Extensible

    11. And Other Stuff

  5. Colophon

View Full Table of Contents
Product Details
Title:
Learning Perl, Second Edition
By:
Tom Christiansen, Randal L. Schwartz
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
July 1997
Pages:
300
Print ISBN:
978-1-56592-284-6
| ISBN 10:
1-56592-284-0
Customer Reviews
Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Learning Perl is the llama, a domestic member of the South American camels native to the Andean range. Also included in this llamoid group is the domestic alpaca, and their wild ancestors, the guanaco and the vicuna. All of these animals graze on grasses, which they chew and cud. The wild guanacos can run up to forty miles per hour and will readily take to water in order to escape danger.

Bones found in ancient human settlements suggest that domestication of the alpaca and llama dates back 4,500 years. In 1531, when Spanish conquistadors overran the Inca Empire in the high Andes they found both animals present in great numbers. These camels are suited for high mountain life; their hemoglobin can take in more oxygen than that of other mammals.

Llamas can weigh up to three hundred pounds, and are mainly used as beasts of burden. A packtrain may contain several hundred animals and can travel up to twenty miles per day. Llamas will carry loads up to fifty pounds, but have a tendency to be short tempered and will resort to spitting and biting to demonstrate displeasure. To the people of the Andes, llamas also provide meat, wool for clothing (although the smaller alpaca provides a superior wool), hides for leather, and fat for candles. Their wool can also be braided into rope and rugs, and the dried dung is used for fuel. Edie Freedman designed this cover and the entire UNIX bestiary that appears on other Nutshell Handbooks. The beasts themselves are adapted from 19th-century engravings from the Dover Pictorial Archive. The cover layout was produced with Quark XPress 3.32 using ITC Garamond from Adobe. Whenever possible, our books use RepKover?, a durable and flexible lay-flat binding. If the page count exceeds RepKover's limit, perfect binding is used.

The inside layout was designed by Nancy Priest and formatted in FrameMaker 5.0 by Mike Sierra using ITC Garamond Light and ITC Garamond Book fonts. Mary Anne Weeks Mayo was the project manager and production editor. Quality control was assured by Jane Ellin, John Files, and Sheryl Avruch. Seth Maislin created the index. Chris Reilley, Linda Mui, and Robert Romano were responsible for the figures. The colophon was written by Michael Kalantarian.

  • Book cover of Learning Perl