BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?

Learning Perl, Second Edition

By Randal L. Schwartz, Tom Christiansen
Foreword by Larry Wall
July 1997
Pages: 300
ISBN 10: 1-56592-284-0 | ISBN 13: 9781565922846
starstarstarstarstar (Average of 4 Customer Reviews)

This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.

The latest edition is also available on Safari Books Online.

Book 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

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. With a foreword by Larry Wall, the creator of Perl, this smooth, carefully paced book is the "official" guide for both formal (classroom) and informal learning. It is now current for Perl version 5.004. Learning Perl is a hands-on tutorial designed to get you writing useful Perl scripts as quickly as possible. Exercises (with complete solutions) accompany each chapter. A lengthy new chapter in this edition introduces you to CGI programming, while touching also on the use of library modules, references, and Perl's object-oriented constructs. Perl is a language for easily manipulating text, files, and processes. It comes standard on most UNIX platforms and is available free of charge on all other important operating systems. Perl technical support is informally available -- often within minutes -- from a pool of experts who monitor a USENET newsgroup (comp.lang.perl.misc) with tens of thousands of readers. Contents include:
  • A quick tutorial stroll through Perl basics
  • Systematic, topic-by-topic coverage of Perl's broad capabilities
  • Lots of brief code examples
  • Programming exercises for each topic, with fully worked-out answers
  • How to execute system commands from your Perl program
  • How to manage DBM databases using Perl
  • An introduction to CGI programming for the Web
Post-purchase benefits:

Register your book | Submit Errata | Examples | Missing Answers from
Appendix A


Browse within this book

Cover | Table of Contents | Index | Sample Chapter | Colophon

Book details

Second Edition: July 1997
ISBN: 1-56592-284-0
Pages: 300
Average Customer Reviews: starstarstarstarstar (Based on 4 Reviews)


Featured customer reviews

Write a Review


Learning Perl, 2nd Edition Review,  July 02 2001
Rating: StarStarStarStarStar
Submitted by Walt Johnston   [Respond | View]

I have found the forewords in all my O'Reilly books very worthwhile including this one. The first chapter ( A Stroll Through Perl) is enough to get you doing some serious and useful work. If you have any programming experience this chapter alone could be all you need.

I use the rest of the book as a reference and an invaluable one. "Learning Perl" sounds like it's meant for beginners, but this book is meaty enough to carry you much farther.




Learning Perl, 2nd Edition Review,  February 21 2001
Rating: StarStarStarStarStar
Submitted by Aaron Tong   [Respond | View]

I am now a little bit embarrassed to speak in favour of the book. As an amateur developer describing true masters of programming, I think the exercises are not so bad. In fact, they are quite inspiring.

Iam now halfway through the book at around chapter 7. If you really take it serious, you can always find that what you're already taught should have enabled you to complete the exercise. (Though the material may not in exactly the same chapter, definitely it must have been covered.)

Perl is difficult. I do not deny that. It is because it has an underlying philosophy "There any many ways to do the same thing. I like my way, yet I don't claim mine to be THE best way." Thus it cannot be treated in the same way as some simple and structured language, like Pascal. Yet the book step by step dissects the language in an elegant way. If you have a programming background in any language, you should have no difficultly to follow through.

As long as the code is easy to read and it is straight to the point, I don't mind someone putting short statements together with multiple colons. Come'on, guys, we are not doing Cobol on 80-column punched cards.


Learning Perl, 2nd Edition Review,  January 07 2001
Rating: StarStarStarStarStar
Submitted by Numair Faraz   [Respond | View]

Holy crap, does this book rule? I think so! Learning Perl is the best programming book out there, and I've read a lot. Well, actually, all of these O'Reilly programming books kick ass. Learning Perl is made for that Unix user who knows what he/she is doing - and wants to do even more, and easier. Learning Perl is an excellent "beginning step" in this process, as after reading this book you can read all of the various books in the O'Reilly Perl universe. And after that, you can also create some awesome Internet applications that can pay the bills while you fool around all day with this Perl stuff that is completely awesome and addictive and makes sense better than anything I've seen.

Man, I'm stoked. Perl kicks ass and Learning Perl is the best. All of those people who just said that the book is "difficult for beginners" and crap need to be shot, as I'm a teenager and this book is easy like cake to me. Believe me, if you find this book hard, please give up on any future in computers you might be envisioning as there aren't any *real* computer books easier than this. Buy this book and never look at life the same way! Well,... at least .... Never look at your monitor the same way again! =)

Read all reviews


Learning Perl, 2nd Edition Review,  October 05 2000
Rating: StarStarStarStarStar
Submitted by Jon DeCamp   [Respond | View]

Greetings,

I am just finishing up with Learning Perl and am very dissapointed. I expected this book to be aimed for beginners, and to be well written. You can't expect someone new to fill in the blanks themselves, but Mr. Schwartz does.

The most exciting part about having a "Learning" book is that it comes with Exersises at the end of the chapters. These exersises are lame, to be blunt. They aren't explained well enough, and the chapters preceding them don't give you all the knowledge to complete them.

The worst part is the answers at the end of the chapters where Mr. Schwartz has the ability to make you feel like you've learned nothing. He'll write the code (That you must match your code to) using techniques that he never teaches, and using bad techniques as well (command; command; command; [Look, one line of code!). On one he even says, "Yes, this one needs some explaining." But never explains! It needed explaining because there were way too many things there not mentioned in the chapter/book.

There are frequent code-flaws in his examples throughout the pages.

Be warned. If you must learn Perl, then you'll need to buy more than just this book. If you know nothing about programming, or shell scripting, then I'm afraid that this book could become too difficult.

-JD


Learning Perl, 2nd Edition Review,  April 15 2000
Submitted by Mark A. McRee   [Respond | View]



I am a currently a student of computer science. Turbo Pascal 7.0 is the only programming language I am versed in. If you are a beginning programmer who knows the basics (variables, constants, program structure, loops, arrays, etc.) you will breeze through learning a second language. If you are a sheer novice, there are plenty of source code examples that do a wonderful job of associating the task with the syntax. Learning Perl is very well written and makes it easy to learn the syntax. Learning Perl was like a good novel to me. I didn't want to stop because the ease of associating the syntax with the task was not a foreign thing. It was like the plot of a good novel easily unfolding right before your eyes. Thanks Mr. Wall, Mr. Schwartz, and Mr. Christiansen. You did great!


Learning Perl, 2nd Edition Review,  March 04 2000
Submitted by Sorin   [Respond | View]



Programming Perl is a must for all webmasters who want to know CGI!!!


Learning Perl, 2nd Edition Review,  December 22 1999
Submitted by John Greene,Ph.D., Johns Hopkins Univers   [Respond | View]



I've just used Learning Perl as a text for a course on bioinformatics for biologists, none of whom had programmed before. They found the book very difficult to read for beginners, as it DOES presume some knowledge of programming, preferably in C (not as bad as the Camel book, however!). I kept wishing for more and better introductory examples in the text, and some of the Exercises at the end of the chapters were a little obscure. Simpler exercises might be better.
I love O'Reilly books and recommend them to my students - but next semester I will be switching to a newly published book on Perl aimed at true programming newbies.


Learning Perl, 2nd Edition Review,  October 26 1999
Submitted by Uzo   [Respond | View]



This is an excellent book. Randal and Tom did a great job. This book assumes absolutely no programming experience with Perl, but it does assume some "minor" previous programming experience. If you have never programmed before, you "might" find this book hard. If you are not coming from the unix environment, you might find chapter 7 "regular expressions" hard. I read this book front to back, and backwards, and it was well enjoyed tho I have tons of previous programming experience. The book is a little bit quick paced, but that is the lovely aspect of it. I like books that get straight to the point with sample example. If you are going to learn Perl, this is door number 1. Uzo


Learning Perl, 2nd Edition Review,  September 29 1999
Submitted by Adam J. Foxson   [Respond | View]



This is THE best book on the market for learning PERL from scratch without necesarrily having any prior programming background. The book is elegant, consise, thorough, and takes users step by step from knowing nothing about PERL, to knowing PERL at a very comfortable intermediate level. It comes with my highest possible recommendation. If you however are coming from a background of programming experience and don't want to be hand held you're better off with Progamming PERL, because that simply is.. The PERL "bible". :-)


Learning Perl, 2nd Edition Review,  September 25 1999
Submitted by Michael   [Respond | View]



I started reading this book with no previous programming experience. At the beginning the pace was just right. But starting around chapter 5 or so I ran into a brick wall. But first, the good stuff. I really appreciate the inclusion of exercises at the end of the chapter. They help the learning process alot. The book is well written and I think the chapters are laid out logically. Now, the things I would like to see improved: Chapter 5's exercise #2 really confused me. After a few hours of trying I finally gave up and typed in the answer from the back of the book. The code given in the answer produced an error message until I changed the line to the alternative mentioned in the comments. Chapter 6 barely mentioned the printf function and then required it's use in an exercise at the end of the chapter. A simple table listing enough information to at least get through the exercises would have been more helpful than the reference to another programming language or book. After Chapter 6 I am shelving the book to be replaced by a more thorough book with a better grasp of it's intended audience. I understand that this book is intended as a companion to "Programming Perl", but at $70 for the set I'll be better off spending $30 for a more complete book that I can actually work through.


Learning Perl, 2nd Edition Review,  August 17 1999
Submitted by Chris X Edwards   [Respond | View]



I had heard Perl was cool. This book cured any
skepticism I had. Perl IS cool and this book
leads a novice through it nicely. I think that
experienced programmers will appreciate Perl
the most since it culls the good stuff from many
programming techniques. As an experienced
programmer, I didn't have too much trouble with
stuff in the book, but I did sense that it
sometimes ran a pretty big range of skill levels
and sophistication.
My only big pet peeve: the foot notes denoted
with astricks. With all that Perl code looking
remarkably like gibberish, it was sometimes quite
hard to find the footnotes reference.
Oh ya, this book is highly Unix-centric. It
mentions DOS, etc, but really, if you're going
to embark on a Perl agenda, get a clue...& Linux.


Learning Perl, 2nd Edition Review,  July 28 1999
Submitted by Len Shmunis   [Respond | View]



Excellent, it's a great book for a beginner !


Learning Perl, 2nd Edition Review,  April 15 1999
Submitted by Geoffrey Cleaves   [Respond | View]



A very, very good book. Before reading this book all I knew was that Perl was a free way to program. Now I'm use Perl everyday at my office in order to produce reports, create dynamic web pages, even query ODBC databases. Granted the last item was outiside the book's scope, but Learning Perl gave me the base of knowledge I needed.

Geoff


Learning Perl, 2nd Edition Review,  March 21 1999
Submitted by Mike Levine   [Respond | View]



Excellent book for beginners. I would recommend this book to anyone wishing to understand the fundamentals of PERL.

Well written and at a pace which makes it easy to understand.


Learning Perl, 2nd Edition Review,  December 26 1998
Submitted by Bill Lo   [Respond | View]



I enjoyed this book very much. I'm a programmer who programs quite a bit of awk (and sed in combination which admittedly I don't think I enjoy doing!). This book has convinced me that I really should give up on awk and sed. Maybe someday... Only wish the price were lower altho I think it's still reasonable!


Media reviews

"Using it {Learning Perl} as your beginner's cookbook, you'll soon be concocting Perl scripts that save you time and drudgery." --Stephan Somogyi, Mac World, July 2001

"With its multitude of clear examples which help to hammer home the many points made and set exercises at the end of each chapter, it builds knowledge rather than drowning the reader with information as many other books seem to doeit truly is a great introduction to a language which is enthusiastically supported by developers and Webcoders worldwide. Well worth a read." --amazon.co.uk

"instructive, while being easy to read, and packed with a lot of good examples." --www.possibility.com

"Learning Perl is the best of that genre (in-depth explorations of the Perl language)" --David Wall, amazon.com

Learning Perl 2nd edition Top Computer Books for 2000 --amazon.com

"a must-have for anyone interested in learning Perl" --SLUG Reviews April 2000

"It does more than merely introduce the reader to the language. It also does an excellent job of conveying the philosophy of Perl. Let me expand on that, while reading this book the reader really gets a good sense of how to do things the Perl Way and in my case believe that way is better, easier and cooler than just about any other programming language out there.. an excellent introduction to Perl and since it has left me wanting for more I'll continue to learn more about this wonderful language. More than anything else this book has given me a solid enough foundation in Perl for me to experiment on my own by writing programs that are at least personally useful, and be able to easily understand the more complicated subjects discussed in the Perl Cookbook and others." -- Josh Borroughs, Alaska Perl Mongers, Feb 2000

"I have read (or started to read) EZone's Perl book, Selena Sol's Perl Book, among others. All were dry, cumbersome, and lack continuity when compared to your *awesome* Introduction to Perl book. I am having the toughest time putting it down. It reads like a Clancy novel where everything comes together as you read more. I do not normally send fan letters, but *WOW* you guys rock." --Peter Tyrrell, Sr Tech Architect, DataStone Systems (http://www.DataStone.com)

"This is a straightforward, no-nonsense book, ideal for the Perl scriptor or for simply getting more from a system without the complexity or cost of heavyweight development...Learning Perlis definitely worth a closer look." --Andrew Morris, Computing May 21, 1998

"If you are a Web site guru or a resident hacker but haven't played with Perl, Learning Perl, 2nd edition is for you...If you are curious about Perl, check out Learning Perl. It is a terrific introduction to the language that will serve as a good reference book once you have read it through." --Brad Morrey, Infoworld, August 3, 1998

"If you are at all interested in creating your own scripts for a more dynamic and interactive website, pick up Learning Perl, 2nd edition. You won't be sorry." --Doug Reed, CompuNotes

"If you're looking for an introduction to Perl, look no further. To continue in the long line of great computer books, O'Reilly brings the enormously popular book, Learning Perl if you'll be programming Perl, you need this book!." --Eric Sun, dotcomma, June 2000

(Quotes for first edition)

"All-in-all, Learning Perl is a fine introductory text that can dramatically ease moving into the world of Perl. It fills a niche previously filled only by tutorials taught by a small number of Perl experts. The first 34 pages comprise an appetizer. A script is evolved, growing in sophistication...[exposing] Perl's power in a way that could easily motivate a skeptic to continue reading the subsequent material in an effort to master its content.... The UNIX community too often lacks the kind of tutorial that this book offers." --Rob Kolstad, ;login:, January/February 1994

"Intended as 'a gentle introduction to Perl' -- the Practical Extraction and Report Language of the Unix world, a powerful set of tools to manipulate text. If you're going to spend much time on a Unix operating system, chances are you will want to learn how to use Perl." --Book Review, ISOC News , November 1993

"Inevitably this book will be compared to the other Nutshell text -
Programming Perl. For those looking for a gentler introduction to Perl, Learning Perl would be a good choice, perhaps with a copy of the Perl manpage for completeness.
Learning Perl does not teach all there is to know about Perl (and this was not an aim of the author) but the material covered is presented well. Many useful examples illustrate the text and in particular the chapter on regular expressions is excellent. Particularly heartening to see are the many exercises complete with solutions and even additional comments. Also useful are the examples available by anonymous ftp. The book is written in a quirky style (matched with a Foreword by Larry Wall) which will not suit everyone. However this does not detract from the content and this book can be recommended as a basic introduction. Those who are already experts in similar languages or tools may wish to chose Programming Perl for its more advanced treatment." --Harvey Richardson, Thinking Machines Corporation, October 1994

"You have your Web site up. Congratulations! Now you want to add a user feedback page or a guest book, or maybe you want to require users to register before they can download your software. Enter Perl. If you are a Web site guru or a resident hacker but haven't played with Perl Learning Perl, 2nd Edition is for you.

In this updated version of the book, authors Randal L. Schwartz and Tom Christiansen familiarize you with the language while keeping you interested with examples and background material. Learning Perl is written in a casual, first-person style that allows the authors to add their insights where appropriate and makes the book a more interesting read than your typical programming, reference, or how-to manual.

Using information in this book, I was able to set up a simple CGI script that prompted users to input data into a form and then immediately returned the results. I also wrote several Perl scripts to take care of housekeeping tasks on my Unix workstation, such as checking the contects of several Web server log files, looking for hits on particular pages, and storing that hit information in a separate text file.

Overall, I was very impressed with the book's coverage. There were complete chapters on many basic concepts such as scalar data; array and list data; file handles and operations; multiprocessing; and CGI programming. Each chapter has exercises at the end; sample solutions are in an appendix in case you get stumped or lazy.

In several places the authors suggest reviewing the Perl documentation or the more advanced O'Reilly book Programming Perl, by Larry Wall, Schwartz, and Christiansen, for more information on a particular topic. They also provide several applications for the language, but there is no question that using Perl for CGI programming is one of the language's main functions.

If you are curious about Perl, check out Learning Perl. It is a terrific introduction to the language that will serve as a good reference book once you have read it through. --Brad Morrey, "InfoWorld Electric", August 1, 1998

Hide extended reviews


See larger cover