Re^3: regular expressions with !by Nkuvu (Priest)
|on Sep 14, 2006 at 18:46 UTC||Need Help??|
Don't use unless; it makes it too easy to misunderstand code.
I dislike overgeneralizations like this, personally. The following code is perfectly clear:
do_something() unless $big_honkin_error;
I'm not saying that you can't avoid unless and make the code still clear, of course:
do_something() if not $big_honkin_error:
but the unless version is just fine.
I wouldn't use unless at the beginning of a condition, however. But that's related to putting the important parts at the beginning of the statement as per perlstyle recommendations. Specifically: