Does the following syntax have a name?
print for ( @ARGV );
exit if $x;
If you mean the the components of the snippet, yes, those are statement modifiers.
If you mean the construct of the statement I would say following:
pre-condition/prefix construct:
... the condition (if $x) is written before (pre) the statement ( { ... exit ...;})
It's the normal (most used) way to write those statements.
for ( @ARGV ){
print;
}
if ($x) {
exit;
}
post-condition/postfix construct:
... the condition (if $x) is written after (post) the statement ( { ... exit ...;})
It's the other way around. Mostly for shortcuts, or one-liners.
Some find it usefull, but it's generally discouraged because or readability and understanding: see @mob's answer
Or from PerlMonks: https://www.perlmonks.org/?node_id=177971
print for ( @ARGV );
exit if $x;