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

What is the relevant code that reproduces the error?

Most likely, the simple creation of the Net::FTP object does not lead to the error immediately.

Please find out what other steps are necessary to reproduce the problem.

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

Replies are listed 'Best First'.
Re^2: "Can't use an undefined value as a symbol reference" in using Net::Ftp
by toohoo (Beadle) on Aug 12, 2013 at 05:46 UTC

    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

      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