in reply to Are there any other statements that are like return if...?
Using this "backwards" style, your code intent stays more visible.
For example, it's common to do this for something like:
Often I'll decide one way or the other based on whether it's a special case or normal case. Be careful though, since as others have pointed out, you can obscure intent as well. Mixing them up, as with this block, I find confusing at a glance. Changing the indentation can help.print "Here we are..." if $debugging;
Cheers!if ($unlikely_condition) { &do_that_voodoo; } &that_yoodoo if $typical_case;
|
|---|