Brain Candy Sale

Special Offers see all

Enter to WIN a $100 Credit

Subscribe to
for a chance to win.
Privacy Policy

Visit our stores

    Recently Viewed clear list

    Contributors | September 15, 2015

    Mary Karr: IMG Memoir Tutorials with Mary Karr, Lena Dunham, and Gary Shteyngart

    Editor's note: It's been 20 years since the groundbreaking memoir The Liars' Club sent Mary Karr into the literary spotlight with its phenomenal... Continue »
    1. $17.49 Sale Hardcover add to wish list

      The Art of Memoir

      Mary Karr 9780062223067

Qualifying orders ship free.
New Trade Paper
Ships in 1 to 3 days
Add to Wishlist
Available for In-store Pickup
in 7 to 12 days
Qty Store Section
1 Remote Warehouse General- General

More copies of this ISBN

Other titles in the Sams Teach 24 Hours series:

Sams Teach Yourself Perl in 24 Hours 3RD Edition


Sams Teach Yourself Perl in 24 Hours 3RD Edition Cover


Synopses & Reviews

Publisher Comments:

Learn Perl programming quickly and easily with 24 one-hour lessons in Sams Teach Yourself Perl in 24 Hours. The book's step-by-step lessons teach you the basics of Perl and how to apply it in web development and system administration. Plus, the third edition has been updated to include five chapters on new technologies, information on the latest version of Perl, and a look ahead to Perl 6. Sams Teach Yourself Perl in 24 Hours focuses on real-world development, teaching you how to:

  • Effectively use Perl for large development projects using Perl modules
  • Use Perl for data processing
  • Utilize Perl as a "glue" language with other programming languages
  • Use Perl as a web development language


Featuring concise, modular chapters ideal for today's working professional, this handbook explores everything one needs to know to begin producing useful CGI programs quickly. Pierce provides readers with a solid foundation in the basics of the Perl language, so they can easily move on to more advanced books and techniques.

About the Author

Sams Teach Yourself Perl in 24 Hours, Third Edition About the Author

Clinton Pierce is a software engineer, freelance programmer, and instructor. He has been answering questions about Perl on USENET for many years and has been writing courseware and teaching Perl to his co-workers and anyone else who will listen for about as long. He is a software engineer for a payroll company, who, when not designing middleware software to integrate legacy systems to the Web, navigating the intricacies of payroll taxes, teaching UNIX and Perl, writing books and articles, or writing programs at home Just For The Fun Of It, harbors secret dreams of being abducted by wood nymphs and living in the deep forest without technology. You can visit his Web site at for updates and corrections, or just to say hello.

© Copyright Pearson Education. All rights reserved.

Table of Contents


    How to Use This Book

    Conventions Used in This Book


Hour 1: Getting Started with Perl.

    Installing Perl

    Stop! Wait! Maybe You Already Have Perl

    Installing Perl on Windows

    Installing Perl on Unix

    Installing Perl on Mac OS


    Some Special Documentation Cases

    What If You Can't Find the Documentation?

    Your First Program

    Typing Your First Program

    Running the Program

    It Worked! So What Happened?

    Perl Play-by-Play

    Something You Should Know

Hour 2: Perl's Building Blocks: Numbers and Strings.




    Scalar Variables

    The Special Variable $_

    Expressions and Operators

    Basic Operators

    Numeric Operators

    String Operators

    More Operators

    One-Operand (Unary) Operators

    Increment and Decrement

    Angle Operator (<>)

    More Assignment Operators

    A Few Words on Strings and Numbers

    Exercise: Interest Calculator

Hour 3: Controlling the Program's Flow.


    The if Statement

    The Other Relational Operators

    What Truth Means to Perl

    Logical Operators


    Looping with while

    Looping with for

    Other Flow Control Tools

    Odd Arrangements

    Fine-Grained Control


    Leaving Perl

    Exercise: Finding Primes

Hour 4: Stacking Building Blocks: Lists and Arrays.

    Putting Things into Lists and Arrays


    Getting Elements Out of an Array

    Finding the End of an Array

    Learning More about Context

    More about the Size and End of an Array

    Context with Operators and Functions

    Manipulating Arrays

    Stepping Through an Array

    Converting Between Arrays and Scalars

    Reordering Your Array

    Exercise: Playing a Little Game

Hour 5: Working with Files.

    Opening Files


    A Good Defense

    Dieing Gracefully



    Free Files, Testing Files, and Binary Data

    Free Filehandles

    Text Files and Binary Files

    File Test Operators

Hour 6: Pattern Matching.

    Simple Patterns

    Rules of the Game

    The Metacharacters

    A Simple Metacharacter

    The Unprintables


    Character Classes

    Grouping and Alternation



    Exercise: Cleaning Up Input Data

    Pattern Matching Odds and Ends

    Working with Other Variables

    Modifiers and Multiple Matching


    A New Function: grep

Hour 7: Hashes.

    Filling Your Hash

    Getting Data Out of a Hash

    Lists and Hashes

    Hash Odds and Ends

    Testing for Keys in a Hash

    Removing Keys from a Hash

    Useful Things to Do with a Hash

    Determining Frequency Distributions

    Finding Unique Elements in Arrays

    Computing the Intersection and Difference of Arrays

    Sorting Hashes

    Exercise: Creating a Simple Customer Database with Perl

Hour 8: Functions.

    Creating and Calling Subroutines

    Returning Values from Subroutines


    Passing Arrays and Hashes


    Other Places for my

    Exercise: Statistics

    Function Footnotes

    Declaring Variables local

    Making a Stricter Perl



Hour 9: More Functions and Operators.

    Searching Scalars

    Searching with index

    Searching Backward with rindex

    Picking Apart Scalars with substr

    Transliteration, Not Substitution

    A Better Way to print

    Formatted Printing with printf

    Specifying the Field Formats

    Formatted Output to a String

    Exercise: A Formatted Report

    New Ways with Arrays

    A List as a Stack

    Splicing Arrays

Hour 10: Files and Directories.

    Getting a Directory Listing


    Exercise: The Unix grep


    Navigating Directories

    Creating and Removing Directories

    Removing Files

    Renaming Files

    Unix Stuff

    A Crash Course in File Permissions

    Everything You Ever Wanted to Know About THAT File

    Exercise: Renaming Files En Masse

Hour 11: System Interaction.

    The system() Function

    The Underlying Command Interpreter

    Capturing Output

    Avoiding Your Shell


    First Lesson in Portability

    Telling the Difference: An Example

Hour 12: Using Perl's Command-Line Tools.

    What Is the Debugger?

    Starting the Debugger

    Basic Debugger Commands


    Other Debugger Commands

    Exercise: Finding the Bug

    Other Command-Line Stuff


    Other Switches

    Empty Angle Brackets and More One-Liners

Hour 13: References and Structures.

    Reference Basics

    References to Arrays

    References to Hashes

    References as Arguments

    Building Structures

    Recipes for Structures

    Example: A List of Lists

    Other Structures

    Debugging with References

    Exercise: Another Game, Maze

Hour 14: Using Modules.

    A Gentle Introduction

    Reading the Documentation

    What Can Go Wrong?

    A Quick Tour

    Exploring Files and Directories

    Copying Files

    Is Anybody Out There?

    Once Again, in English?

    More Diagnostics

    Full List of Standard Modules

    Where Do You Go from Here?

Hour 15: Finding Permanence.

    DBM Files

    Important Points to Know

    Walking Through DBM-Tied Hashes

    Exercise: A Free-Form Memo Pad

    Text Files as Databases

    Inserting into or Removing from a Text File

    Random File Access

    Opening Files for Read and Write

    Moving Around in a Read/Write File


    Locking with Unix and Windows

    Reading and Writing with a Lock

    Locking with Windows 95 and Windows 98

    Locking Elsewhere

Hour 16: The Perl Community.

    What's Perl All About, Anyway?

    A Brief History of Perl

    Open Source

    The Development of Perl

    The Comprehensive Perl Archive Network (CPAN)

    What Is CPAN?

    Why Do People Contribute?

    Your Next Steps

    Your First Step

    Your Most Useful Tool

    Debug Your Program

    First, Help Yourself

    Learn from the Mistakes of Others

    When All Else Fails, Ask

    Another Place to Look and Ask: PerlMonks

    Other Resources


Hour 17: Writing Modules.

    Building a Module

    Calling the Module


    Scoping Revisited

    Another statement: our

    Forcing Your Names on Others

    Example: A Module to Handle Common File Information Requests

Hour 18: Object Primer.

    Classes, Properties, and Methods

    A Thought-class: Car

    Example: Implementation of Car in Perl

    Using the Car Class

    Example: File Information Class

    Using the File Information Class

Hour 19: Data Processing.

    How to Look at Data

    Unstructured Data

    Table Data

    Hierarchical Data

    Binary Data

    Dealing with Table Data

    Example: Email Order Taker

    Example: Verifier for the Email Order

    XML Data

    Reading XML Using Regular Expressions

    Reading XML with XML::Simple

    Example: Extending Your Ordering System for XML Input

Hour 20: Perl as a Glue Language.

    Weather Station

    Part 1: Finding Out Where You Are

    Part 2: Finding the Local Airport

    Part 3: Fetching the Weather and Putting It All Together

    Presenting Data as PDF

    Example: Weather Report as PDF

    Reading and Writing Excel Spreadsheets

    Using Perl to Create a Spreadsheet

    Reading the Spreadsheet

Hour 21: Introduction to CGI.

    Browsing the Web

    Fetching a Static Web Page

    Dynamic Web Content-The CGI

    Don't Skip This Section

    The Checklist

    Your First CGI Program

    Installing the CGI Program on the Server

    Running Your CGI Program

    What to Do When Your CGI Program Doesn't Work

    Is It Your CGI Program?

    Server Problems

    Fixing Internal Server or 500 Errors

Hour 22: Basic Forms.

    How Forms Work

    Short Review of HTML Form Elements

    What Happens When You Click Submit?

    Passing Information to Your CGI Program

    GET and POST Methods

    Web Security 101

    A Clear Link

    Watching for Insecure Data

    Doing the Impossible

    Denial of Service

    A Guestbook

Hour 23: Complex Forms.

    The Stateless Web

    Hidden Fields

    The Online Store

    A Multipage Survey

Hour 24: Manipulating HTTP and Cookies.

    The HTTP Conversation

    Example: Fetching a Page Manually


    More Details on Calling CGI Programs

    Passing Parameters to CGI Programs

    Special Parameter Considerations


    How to Make Cookies

    Example: Using Cookies

    Restricting Cookies

    Long Term Cookies

    Problems with Cookies

    Cookies Are Ephemeral

    Cookies Aren't Always Supported

    Some People Don't Like Cookies


Appendix A: Installing Modules.

    Picking the Right Module

    Installing the Modules Under


      UNIX, Using CPAN

      UNIX, The Hard Way

      Mac OS X

    What to Do When You're Not Allowed to Install Modules

    Using Modules Installed in Strange Places


Product Details

Pierce, Clinton
Programming Languages - CGI, Javascript, Perl, VBScript
Perl (computer program language)
Programming Languages - Perl
Edition Number:
Edition Description:
Trade paper
Teach Yourself -- Hours
Publication Date:
June 2005
Grade Level:
Professional and scholarly
9 x 7 x 1.1 in 750 gr

Other books you might like

  1. Perl Cookbook Used Trade Paper $14.95
  2. C# Primer Plus (Primer Plus) New Trade Paper $44.95
  3. Eclipse Cookbook New Trade Paper $45.50
  4. Java Cookbook 2ND Edition Used Trade Paper $25.00
  5. Perl Best Practices New Trade Paper $39.99

Related Subjects

» Computers and Internet » Computer Languages » Javascript
» Computers and Internet » Computer Languages » Perl

Sams Teach Yourself Perl in 24 Hours 3RD Edition New Trade Paper
0 stars - 0 reviews
$34.99 In Stock
Product details 480 pages Sams - English 9780672327933 Reviews:
"Synopsis" by , Featuring concise, modular chapters ideal for today's working professional, this handbook explores everything one needs to know to begin producing useful CGI programs quickly. Pierce provides readers with a solid foundation in the basics of the Perl language, so they can easily move on to more advanced books and techniques.
  • back to top


Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at