in reply to Re: Perldoc, the tutorial in thread Perldoc, the tutorial
Patches welcome. (This is usua... nevermind *grin* - Juerd) I'm sure that if you write a good tutorial, it will be included in the main distribution. Just wishing for things isn't going to make it happen - someone will have to write it.
It seems my rant was posted a bit too soon, as perlintro is a nice tutorial for beginners. It doesn't cover everything I think it should, but I guess it's a matter of time before more docs get into the distribution. I myself am not a good writer, so I won't be the one to write a tutorial.
I posted this to find out if there is already a tutorial that is accepted as "the best", but there hasn't really been an answer to that yet.
Don't take this the wrong way. This is how Perl is being developed. The surest way to get things added/changed is by just doing it, and submitting the patch.
Maybe someone here wants to write a good tutorial that covers everything? Or wants to convert an existing one to pod? Perhaps the document we're searching for already exists, but just isn't named perltut?
My post isn't just a "hey, I want this and you should make it happen" post: I want to know how others think about this and whether what I'm wishing is sane.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
Re: Re: Re: Perldoc, the tutorial
by erikharrison (Deacon) on Jun 04, 2002 at 16:59 UTC
|
My favorite Perl tutorial. Also, I'm very happy about pack getting a tutorial. Maybe now I can figure it out.
Cheers,
Erik
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet
| [reply] |
|
The tutorial you describe, the one on http://www.sthomas.net/roberts-perl-tutorial.htm, covers a lot of subjects, which is good. It warns about some common mistakes, which is also good. But even by skimming over it, I found a lot of mistakes. I'll list some of them below.
| [reply] [d/l] [select] |
|
++Juerd
I probably shouldn't have mentioned this tutorial, without going back and reading over it using my newfound understanding of the language. The thing that was appealing to me about the tutorial was that it compiled (which is not true of a signifigant number of online tutorials) and his writing style was easily understood. It is worth noting that several of your complaints could be (emphasis on the could) construed as style arguments. But to say that is as much to retro justify having posted the link in the first place, which I shouldn't be doing :-).
An unfortunate fact is that it may be the best online tutorial that is widely available. In fact, I came across via a link from http://perl.com so in my youthful innocence I assumed it was accurate.
Oh, well.
Cheers,
Erik
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet
| [reply] |
|
|
Not all of the things you point out are as grievious as you make them
out to be.
- Not quoting a heredoc terminator is hardly bad style.
- Strict isn't mentioned early enough which is a valid
complaint, but even Learning Perl 2nd ed didn't have and entry for
strict in the index, though it does actually talk about it for a
few paragraphs on page 99. Did you used to recommend this book? This
tutorial does a better job covering strict than the 2nd ed Llama
which came out about the same time.
- Subs at the bottom is more of a religious issue. Yes the file
scoped lexicals are then shared with the subs but I've never once
seen this cause a real-world problem with the code and many coders,
of varying skill levels, I've worked with.
- Using # as a delimiter is fine, in the right context. The rule is
simple: pick a delimiter that makes the pattern easier to specify,
and # does that just fine for many.
- srand was not automatically called in versions prior to 5.004,
and 5.004 only initially came out the same year this tutorial was
first written (1997 according to copywrite notice).
- He did show the C for loop style, for with range, and
foreach over an array discussing implicit use of $_. I really don't
grasp your complaint on this point.
I am not saying your points are wrong, and I'm not saying the
tutorial is all good and correct, just that this particular tutorial
isn't as bad as it has been made out to be. Yes Robert's tutorial is
far out of date (last update 1999 it appears), and some content was
out of date when it was written. It was still, and maybe still is,
one of the better such tutorials out there. I haven't read the new
perlintro in 5.8.0RC1 yet.
| [reply] |
|
|
| A reply falls below the community's threshold of quality. You may see it by logging in.
|
|
|