Think about Loose Coupling | |
PerlMonks |
Re: Pearls (not really) of Perl programmingby revdiablo (Prior) |
on Nov 24, 2004 at 18:35 UTC ( [id://410206]=note: print w/replies, xml ) | Need Help?? |
Everyone loves to post bad examples from other peoples' code. But I will [once again] bravely delve into my own code archives for terrible examples! This is at the beginning of a script that I must have written shortly after I learned about use strict. I didn't really understand lexical scope, I just wanted the errors to go away. Can we say "missing the point"?
Here's another fun one. I can think of one or two easier ways to do this nowadays....
Or how about something like this. I guess I didn't yet understand how to access nested hashes, because the use of %temphash is just bizarre (trimmed for pasting):
I could go on all day, to my own humiliation. I'll leave it at that though. Perhaps others will now be tempted to post their own bad code, rather than someone else's. :-)
In Section
Meditations
|
|