in reply to Re: "Can't use an undefined value as a symbol reference" in using Net::Ftp
in thread "Can't use an undefined value as a symbol reference" in using Net::Ftp

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

  • Comment on Re^2: "Can't use an undefined value as a symbol reference" in using Net::Ftp
  • Download Code

Replies are listed 'Best First'.
Re^3: "Can't use an undefined value as a symbol reference" in using Net::Ftp
by Corion (Patriarch) on Aug 12, 2013 at 08:00 UTC

    This seems to be similar to bugs RT #48260 and RT #37700. This should be fixed by with 1.22_02 maybe.

      Thank you. Have a nice day. :-)

      Hello again,

      I guess this is solved already? Can someone confirm please?

      Is there a workarround please such as set a additional value in object or something similar? We are bound to the old versions it seems, because otherwise some behaviour will change and destroy the complete work process.

      Thanks in forehand, Thomas

        Either install and use the new version or patch your old version with the changes, or look at the changes from the old to the new version and find out what causes the problem and do things differently. This is analysis that has to be done by you.