NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Simplicity (Score:2)
MJD is certainly adept at spotting red flags [plover.com].
--
xoa
The point. (Score:1)
Yes: the point of his post. :-)
It might have been useful if he had added a note to the effect that “this is still not very good, but it’s the first step to cleaning it up” – but a complete cleanup wasn’t what he set out to write about.
Re: (Score:2)
understanding beginners' code (Score:1)
Too harsh (Score:1)
I thought... (Score:1)
But there are still more things wrong with the original code that he didn't discuss. For example:
H*ll, if you want to loop over the keys of a hash, at least don't loop over both the keys and the values! Granted, in MJD's replacement code, the loop is gone, so this problem has disappeared too, but this is an major mistake that shouldn't just be skipped over.
Actually, I thought the entire point of that part of the article was to point out that the user was using a loop to find the element that they could have simply addressed directly... and (I suppose) that is why he didn't address other "issues" in the code. They weren't the point.
At least that was my interpretation...
Re: (Score:1)
the following bit would have been more accurate.