Hi

Please provide solution for below mentioned problem, message showing while 
executing below mentioned script

CODE:

#!/usr/bin/perl 
use Net::FTP;
use File::stat;
##I'm hoping to use pasv_xfer(sourcefile, dest_server) to do a server to server 
passive transfer

$ftpout = Net::FTP->new("192.168.180.188", Debug => 0)
    or die "Cannot connect to 192.168.180.188: $@"; #destination server
      $ftpout->login("tj","tj") or die "Cannot login ", $ftpout->message;
    warn "Failed to set binary mode\n" unless $ftpout->binary();
    $pwddirout=$ftpout->pwd();
    $ftpdest="$pwddirout/training";
    print "Destination Directory $ftpdest\n";
    
   $ftpin = Net::FTP->new("192.168.180.192", Debug => 0)
    or die "Cannot connect to 192.168.180.192: $@"; #source server
 $ftpin->login("iop123","iop312") or die "Cannot login ", $ftpin->message;

 $pwddir=$ftpin->pwd();
 warn "Failed to set binary mode\n" unless $ftpin->binary();
 $ftpin->pasv_xfer("ApJ306023.xml", $ftpdest);
 $lsize = stat("c:/temp/apj_697_1_106ej.zip")->size;
 print "SIZE:- $lsize";
 $ftpout->quit() or die "FTP: Couldn't quit.";
 $ftpin->quit() or die "FTP: Couldn't quit.";


MESSAGE: Can't call method "port" without a package or object reference at 
C:/Perl/lib/Ne
t/FTP.pm line 1122.

Kanhaiya Prasad
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to