Penguin Power!
Buy Linux distributions at discount prices!
Linux| Perl| PHP| Webserv| Databases| Sysadmin| Programming| Filesystems| Java| Webprog
News from Slashdot
FDA Unveils Biosimilars Guidance

IRS Employee Stole Data To Forge $8M In Fraudulent Returns

Researchers, Biosecurity Board Debate How Open Virus Research Should Be

Smart Camera Tells Tobacco From Marijuana

FCC Maps the 3G Wasteland Of the Western US

What Does a Software Tester's Job Constitute?

Famous For Fifteen People: Is Everyone a 'Facebook Celebrity'?

Skin Cancer Drug Reverses Alzheimer's Symptoms In Mice

Ask Slashdot: How To Allow Test Takers Internet Access, But Minimize Cheating?

Tesla Reveals Its Model X Gullwing SUV


Related products:

Perl Cookbook, Second Edition Perl Cookbook, Second Edition

Perl Best Practices Perl Best Practices

Mastering Regular Expressions, Second Edition Mastering Regular Expressions, Second Edition

Advanced Perl Programming Advanced Perl Programming

Programming the Perl DBI Programming the Perl DBI

Perl Books

Learning Perl Objects, References, and Modules

Perl Books
Format: Paperback
Author: Randal L. Schwartz
ReleaseDate: 30 June, 2003
Publisher: O'Reilly Media
Rating:

Important Note - Discontinued
O'Reilly's "Intermediate Perl" by the same authors (Randal L. New editions to this book are no longer in the works, as this title is being discontinued. Schwartz, brian d foy, and Tom Phoenix) is the new edition of this book. The first edition of "Intermediate Perl" was released March 2006. So if you're thinking about purchasing this book, purchase "Intermediate Perl" instead. It includes the same material (albeit updated) by the same authors. Once again, this title has been discontinued.


"Evolutionary" method to explain Perl Structures, References, Objects
Thus, the book does not serve the "conclusions" right away; it reaches them via a series of experimentations and improvements (in fact, similarly to what is done in other sciences). This book attempts something very interesting: not just to describe "how" central aspects of Perl work, but also to understand the process of "how Perl got there".
To make it interesting (and humorous but realistic at the same time) the book presents a band of "software sailors", who write navigation software. They quickly discover the pleasures of workgroup development; they start reusing software with "eval" (on library files), they then limit unwanted effects with "do", to finally adopt "require" to pull a file only once. Then, after chaos still erupts on name collisions (two different "turn_to_port" routines with the same name, which send one boat into a loop. . ), the sailors discover "package", and finally, the fleet can proceed with a certain harmony [note: given the structure of the book, "use" will be introduced a lot later, in chapter 12].
This is a very original software lesson; for anyone who reads chapter 2, it will be hard to see the line "package Xyz" and not smile remembering (at least once) the conflicts between Skipper & Gilligan. This is great teaching, as your mind associates a "scenario", not just a "habit", to a programming line.

There are other chapters equally brilliant; more than the "Object" chapters, I liked especially the one on "Subroutine References". It begins explaining how to reference a named subroutine, and it then builds a hash of sub references. Then, it prods us to do the next logical step (with a trick which recurs along the book: "why waste some brain cells to define a name for each subroutine, to only use it to initialize the data structure?"), gently pushing the reader to accept "anonymous" subroutines, code them in the hash structure itself, and enjoy the remarkable simplification of the code that results! The stage is now set to introduce "Callbacks", and then "Closures"; again, with the same method of "one evolution at the time":
a) first a variable is declared to hold the callback, followed by a naked block with a private context and the callback assignment.
b) then the code is simplified with a subroutine encharged to contain the variables on which the closure is done and to return the reference to the anonymous subroutine.
c) last, it shows how the same subroutine can be invoked simultaneously, keeping its own context in every call.
I must say that, after you begin to realize the power of "Closures" (I went back to read "Programming Perl", p 260-262, to fully understand it), you regret that the only example given by the book is so elementary (findFile). Imagine instead, to remain with the sailors theme, a routine which computes a boat trajectory (closing on boat's initial position, velocity, etc), and a main routine instantiating multiple boats and launching them in a race. Multiple automatas in action (with a few lines of code!); this would close the chapter in full glory.

More than once you have the strange feeling that the book was written under a constraint of having less than 200 pages. Examples: it presents a remarkable lesson on Autovivification, but fails to alert against unvoluntary autovivifications (when testing structures for existence).
Or see for, in chapter 2, the section "Packages and Lexicals" whose first line is: "A lexical variable isn't prefixed by the current package because package variables are always global". The statement is not false but it is so awkward at the start a section ("X does not have property Z, because only Y has Z"). Why not to spend a few pages, mentioning the Perl symbol table and on this basis explain concretely the difference between "lexical, global, local"? else, everything remains so abstract.
Still, these are minor defects of an unique remarkable book. The introduction mentions that the material is built on the Stonehenge courses; for all of us without the opportunity to attend them, but able to read, think and experiment, this book is an excellent deal to "see" the Stonehenge people in action.


Great book
It only gets 4 stars because, hey, I can't give everything five stars. This book is perfect if you want to expand your perl horizon.



Go to lyrics-now.com for music lyrics and song lyrics.
Bass and guitar tablatures: Fretplay.com, Guitar tabs, Bass tabs, Fresh tabs, How to read tabs
Plan your travel and holiday here: Travel Helper!