- or download this
my $ftp = Net::FTP->new( ... ) or die $!;
- or download this
my $ftp = Net::FTP->new( ... );
if ( defined $ftp ) {
...
} else {
warn "Hey, this thang ain't workin! $!\n";
}
- or download this
$SIG{__DIE__} = sub { warn shift and exit };
my $ftp = Net::FTP->new( ... ) or die $!;
- or download this
sub ftp_stuff {
my $ftp_ref = shift;
...
$ftp_ref->quit;
}
my $ftp = Net::FTP->new ? ftp_stuff $ftp : warn $!;