in reply to Location of Conditional test effects results
The point being: once you establish that you've reached an empty slot at a given point in your structure, you may want to avoid going any deeper down that particular path, unless you really do want to create new structure where none existed previously.for my $record (@$records) { my $editor; print $lbr, "Record: $record->{'zone_record_id'}"; if ( @{$record->{services}} == 0 ) { $editor = 'plain edit'; } elsif ( $record->{services}[0]{class} =~ /Primary|Secondary/ ) { $editor = 'no editor'; } else { $editor = 'service edit'; } print $editor; }
|
|---|