I take it that you do not like statement modifiers for whatever reasons. Otherwise, just what is wrong with ...
my $p; $p = $q if condition();
...?
In reply to Re^2: "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)
by parv
in thread "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)
by parv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |