go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
missingthepoint,
A lesson learned as a result of being bitten sticks much more readily than one learned as a theoretical precaution. Here are two cases in point:
I started using the second construct because adding additional parameters only requires me to change the LHS. I had got bitten enough times to warrant the change.
The reason some people recommend the latter is because if you accidently type the == equality operator as the = assignment operator, you will get an error (not so for the former). Since I vary rarely get bitten by this, I still use the former. In a nutshell, there is no substitute for experience. The gray area becomes how much needs to come from your own personal experience or how much you can learn from someone else's experience. I recommend reading Re: Refactoring a large script and adopting any advice there that you don't currently use. Share what common mistakes you make and ask around what methods others use to avoid them. Share what you have come up with on your own so that others can benefit. Cheers - L~R In reply to Re: Avoiding silly programming mistakes
by Limbic~Region
|
|