This page: | Category: | index pages:
|
Learning Perl Third Edition Randal L. Schwartz & Tom Phoenix Copyright © 2001, 1997, 1993, by OReilly & Associates, Inc. | ||||
---|---|---|---|---|
Note (Hals): end note | ||||
Chapter 1 Introduction | ||||
What Does Perl Stand For? | ||||
Is Perl Easy or Hard? | ||||
[...] the number of bugs in a program is roughly proportional to the length of the source code* (rather than being proportional to the programs functionality) [...]
* With a sharp jump when any one section of the program exceeds the size of your screen. | Topic: | |||
What Is Perl Not Good For? | ||||
The real way to keep your secret algorithm a secret is, alas, to apply the proper number of attorneys; they can write a license that says you can do this with the code, but you cant do that. And if you break our rules, weve got the proper number of attorneys to ensure that youll regret it. | Topics: | |||
How Can I Get Perl? | ||||
How Can I Get Support for Perl? | ||||
[...] its a program, and every program has at least one bug.*
* Programmers also know that every program has at least one line of unnecessary source code. By combining these two rules and using logical induction, its a simple matter to prove that any program could be reduced to a single line of code with a bug. | Topic: | |||
Chapter 3 Lists and Arrays | ||||
List Assignment | ||||
The pop and push Operators | ||||
Occasionally, a beginning Perl programmer (wanting to see how Perls speed compares to Cs) will take, say, a sorting algorithm optimized for C (with many array index operations), rewrite it straightforward in Perl (again, with many index operations) and wonder why its so slow. The answer is that using a Stradivarius violin to pound nails should not be considered a sound construction technique. | Topic: | |||
Chapter 4 Subroutines | ||||
System and User Functions | ||||
The code examples used in this book are recycled from at least 40% post-consumer programming, and are at least 75% recyclable into your programs when properly decomposed. | ||||
Chapter 8 More About Regular Expressions | ||||
Anchors | ||||
Word Anchors | ||||
And even in text that may be mostly ordinary English, its normal to find a soupçon of other characters spicing things up. | ||||
Chapter 10 More Control Structures | ||||
The elsif Clause | ||||
You may have noticed by this point that the keyword is spelled elsif, with only one e. If you write it as elseif, with a second e, Perl will tell you that it is not the correct spelling. Why not? Because Larry says so. In fact, he resists any suggestion that it even be permitted as a valid alternative spelling. If you want to spell it with a second e, its simple. Step 1Make up your own language. Step 2Make it popular. | ||||
The for Control Structure | ||||
The Secret Connection Between foreach and for | ||||
Among programmers, especially Perl programmers, laziness is one of the classical virtues. | Topic: | |||
Its easy to get a so-called fencepost bug with this kind of loop, like what happened when the rancher needed enough fenceposts to make a 30-meter-long fence with a post every three meters. (The answer is not ten fenceposts.) | ||||
Chapter 13 Manipulating Files and Directories | ||||
Renaming Files | ||||
This isnt just any old frequent question; the question of renaming a batch of files at once is the most-frequent question asked in these newsgroups. And thats why its the first question answered in the FAQs for those newsgroups. And yet, it stays in first place. Hmmm. | ||||
Chapter 17 Some Advanced Perl Techniques | ||||
Slices | ||||
Hash Slice | ||||
If it sounds as if were repeating ourselves here, its because we want to emphasize that hash slices are analogous to array slices. If it sounds as if were not repeating ourselves here, its because we want to emphasize that hash slices are analogous to array slices. | ||||
A hash slice is a slice (not a hash) in the same way that a house fire is a fire (not a house), while a fire house is a house (not a fire). More or less. | ||||
text checked (see note) Feb 2005 |
Background graphic copyright © 2003 by Hal Keen