my $num = $recFono->field_as_text('102');
my $type = $recFono->field_as_text('104');
if ($num && $type) {
something();
}
This has the benefits of
- Letting the assignments standing out clearly
- Shortening the individual lines, making them easier to read
- Clearly conveys that you want the arguments of the logical operator evaluated independent of truth/falsehood of the first one
If you really want it on one line, you can write your own logical function:
sub myor {
$_[0] or $_[1];
}
if (myor( ..., ...)) {
}