in reply to
Avoiding silly programming mistakes
There are "doh" mistakes that I still do sometimes, like writing a sub to the wrong file accidentally, or mis-typing a package name and wondering why everything fails.
So far I haven't really found a way to avoid those, and I suspect that nothing can defeat human stupidity ;-)
If it comforts you, over time you'll get a feeling for what mistakes are "do'h mistakes", and you'll get accustomed to the few most frequent, and identify them rather quickly.