package Mail;
-use vars qw($mailbox $mailprog @ISA @EXPORT);
+use vars qw($mailbox $mailprog @EXPORT);
# ===================
# Funktionsexport
# ===================
-require Exporter;
-@ISA = qw(Exporter);
+use base qw(Exporter);
@EXPORT = qw(is_mail_address send_mail);
########################################
sub get_list ($$) {
my ($start,$list)=splice @_;
- my $string="";
- return "" unless (length($list));
- if (ref($list)) {
- return "" unless (@$list);
- foreach (@$list) {
- $string.="$start: $_\n";}}
- else {
- $string="$start: $list\n";}
+ return $start . ': ' . $list . "\n" if (defined $list and not ref $list and length $list);
- # Rueckgabe
- $string;
+ return $start . ': ' . join (', ',@$list) . "\n" if (ref $list);
+
+ '';
}
##############################################