|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: Avoiding silly programming mistakesby Skeeve (Vicar) |
| on Aug 20, 2008 at 09:50 UTC ( #705460=note: print w/ replies, xml ) | Need Help?? |
|
Yesterday I had a 'DOH' moment twice. One moment twice? Yes ;-) The second one was a deja-vu because it was the same mistake in the same sub at another position. What I learned from it is: NEVER EVER use if ( $somevariable ) if you really wanted if ( $somevariable ne '' ) s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{% +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||