if ($verbose) {
print "\n\nTemplate variables:\n";
for my $key (sort keys %$cols) {
- print "$key: $cols->{$key}\n";
+ print "$key: " . ($cols->{$key} || '') . "\n";
}
print "\n";
}
} else {
# Say who we want to send to.
print "Want to send to: $cols->{'email'}" .
- ($bcc ? "\n BCC " . (ref($bcc) eq 'ARRAY' ? join(", ", @{$bcc}) : $bcc) . " " : '') .
- ($cc ? "\n CC " . (ref($cc) eq 'ARRAY' ? join(", ", @{$cc}) : $cc) . " " : '') . "\n";
+ (defined $bcc ? "\n BCC " . (ref($bcc) eq 'ARRAY' ? join(", ", @{$bcc}) : $bcc) . " " : '') .
+ (defined $cc ? "\n CC " . (ref($cc) eq 'ARRAY' ? join(", ", @{$cc}) : $cc) . " " : '') . "\n";
}
}