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