I won't recommend it, but it is still allowed. I thought it started warning under certain conditions since 5.14, but I'm not able to reproduce it.$ perl5.15.9 -wE 'my $x = 1 if 2; say $x // "???"' 1 $ perl5.15.9 -wE 'my $x = 1 if 0; say $x // "???"' ??? $
In reply to Re^2: order of operations with conditionals at the end
by JavaFan
in thread order of operations with conditionals at the end
by BeneSphinx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |