, , .
, :
pre-condition/prefix construct:
... ( $ x) (pre) ({... exit...;})
( ) .
for ( @ARGV ){
print;
}
if ($x) {
exit;
}
-/ :
... ( $ x) (post) ({... exit...;})
This is the opposite. Mostly for shortcuts or single line. Some find this useful, but it is usually discouraging because of readability and understanding: see @Mob answer
Or from PerlMonks: https://www.perlmonks.org/?node_id=177971
print for ( @ARGV );
exit if $x;
source
share