in reply to Commifying sensibly
You mean the one from perlfaq5?
but that thing is just clumsy and awful and obfuscated for any Perl beginner. So, just for my own entertainment, I decided to see how I'd do it "for real" - i.e., in the best way possible rather than by this contrived method.I agree that many of the solutions in the FAQ are written more as a cook book rather than as a tutorial. On the other hand, do you honestly feel that your solutions are any better if your target audience is a perl beginner?
If that is your target audience, I would have gone with something a bit more verbose.
Since it seems your intended goal was to educate beginners, each step should be preceded by the appropriate amount of comments. It may not be obvious what a regex is doing so you could recommend YAPE::Regex::Explain. They may not have considered edge cases, so rather than incorporate them into a single step that is doing something else - break it out on its own statement.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Commifying sensibly
by Anonymous Monk on Dec 01, 2008 at 15:51 UTC | |
|
Re^2: Commifying sensibly
by oko1 (Deacon) on Dec 02, 2008 at 13:50 UTC | |
by Limbic~Region (Chancellor) on Dec 02, 2008 at 19:12 UTC | |
by oko1 (Deacon) on Dec 03, 2008 at 18:23 UTC |