If the undef has a significant meaning, I define it explicitly to make the code as clear as possible. Otherwise, I spend my keystrokes elsewhere. For example:
my $found = undef;
foreach my $candidate (@candidates) {
if ( good($candidate) ) {
$found = $candidate; last;
}
}
if (defined $found) {
print "Found a good candidate: $found\n";
}