my $found = undef; foreach my $candidate (@candidates) { if ( good($candidate) ) { $found = $candidate; last; } } if (defined $found) { print "Found a good candidate: $found\n"; }
In reply to Re: Perl Style: Is initializing variables considered taboo?
by FloydATC
in thread Perl Style: Is initializing variables considered taboo?
by ait
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |