http://qs321.pair.com?node_id=935475


in reply to logical non-short-circuit operators

Why? Does field_as_text have a side effect? If so, it's poorly named.

If the assignments are the side effects you want to perform unconditionally, then move them out of the condition.

my $num = $recFono->field_as_text('102'); my $type = $recFono->field_as_text('104'); if ($num || $type) { ... if ($type) { ... } ... }

If it's a scoping issue, create a scope.

{ my $num = $recFono->field_as_text('102'); my $type = $recFono->field_as_text('104'); if ($num || $type) { ... if ($type) { ... } ... } }