Thanks so far. The following code is the one that is the relevant part. All this together is surrounded by an eval
if ($server =~ m/(conopera|176.98.166.98)/i) { # fies, n +ame wurde in IP geaendert $passive = 1; $ftp = Net::FTP->new($server, Passive => 1) or die "Cannot connect to $server (Passive=$passiv +e): $@"; } else { $ftp = Net::FTP->new($server) or die "Cannot connect to $server: $@"; } $ftp->login($login, $passwd) or die "Cannot login (Passive=$passive) ", $ftp->m +essage; $ftp->cwd($remotedir) or die "Cannot change working directory (Passive=$ +passive) ", $ftp->message; $ftp->binary or die "Cannot change to binary mode (Passive=$pas +sive) ", $ftp->message; $ftp->put($localfilename, $remotefilename) or die "put failed (Passive=$passive) ", $ftp->mes +sage, "; localfilename: [$localfilename], remotefilename: [$remotefil +ename]"; $ftp->quit;
thanks in forehand, Thomas
In reply to Re^2: "Can't use an undefined value as a symbol reference" in using Net::Ftp
by toohoo
in thread "Can't use an undefined value as a symbol reference" in using Net::Ftp
by toohoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |