4 ms·
I love that feature of Perl, and to be explicitly clear to those that are unfamiliar with it, Perl does not allow unbraced single line if's in the normal sense
by kbenson 11y ago
I love that feature of Perl, and to be explicitly clear to those that are unfamiliar with it, Perl does not allow unbraced single line if's in the normal sense (pre-conditional ifs), and does not allow braced post-conditional ifs. For example, these are valid:
if ( $foo ) {
bar();
baa();
}
quux() if $foo;
And these are not:
if ( $foo ) bar();
{ bar(); baz(); } if $foo;