For me, the choice between:
consequence() if condition(); # or condition() and consequence();
And the choice between:
consequence unless condition(); # or condition() or consequence();
Is mostly a question of front-loading. What part of the statement seems the most important in its context? If we're just trying to avoid warnings about undef values, then adding if defined $foo to the end of a statement seems less obnoxious than putting the condition up front. But if we're going to do a lot of processing on $line, then my $line = <$fh> or return; is probably clearer than return unless my $line = <$fh>;.
In reply to Re^8: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by tobyink
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by likbez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |