Reading the first two paragraphs of perlsyn, I've noticed there is more information in there about sed, awk, C and command line switches than introductory perl syntax.
A Perl script consists of a sequence of declarations and statements.
The sequence of statements is executed just once, unlike in sed
and awk scripts, where the sequence of statements is executed
for each input line. While this means that you must explicitly
loop over the lines of your input file (or files), it also means
you have much more control over which files and which lines you look at.
(Actually, I'm lying--it is possible to do an implicit loop with
either the -n or -p switch. It's just not the mandatory
default like it is in sed and awk.)
Perl is, for the most part, a free-form language. (The only exception
to this is format declarations, for obvious reasons.) Text from a
"#" character until the end of the line is a comment, and is
ignored. If you attempt to use
What is this actually teaching?
This quantifies like so:
Obviously a hold over from the days when Perl was just a replacement for awk and sed and Real Programmers coded in C. While this information might be useful, the opening paragraphs of the Perl syntax documentation is not the place to put it.
separate pods ? (Score:1)
Yes it's in there now, but moving them off to their own section would allow a little more expounding on these topics, and may remove some of the clutter from those pods that contain these references now.
If this makes no sense, it's because I'm still on my first cup of coffee..
Reorganize rather than re-write (Score:3, Interesting)
It's useful information, but you're right, it doesn't belong in an introductory document. It might be more appropriate in perltrap, for instance.
In the same vein, I keep thinking there's a lot of documentation, but it's hard to skim because it's all one flat structure. (How many people remember what's in perldsc?) It would be nice to have it arranged into groups, maybe something like:
- Introductory and Core: perlsyn, perlfunc, perldata, perlbook, perlboot, etc.
- Internals: perlguts, perlhack, perldebguts, etc.
- FAQs: perlfaq1 thru N
- System-specific: perlaix, perlhpux, and all the rest.
- Tutorials: perldsc, perltoot, perltooc, perlretut, etc.
I could go on, but you get the idea. It would be even better if you could cross-reference, since some things easily fit in more than one category.I'd gladly make and maintain such a list, but I don't know how to get it out there. Give it to you? ;-)
Reply to This
Re:Reorganize rather than re-write (Score:3, Insightful)
5.8.0's perl(1) [perldoc.com] already does that breakdown, pretty much exactly along those lines.
As an aside, the formatting on perldoc.com is quite nice.