ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
Net::FTP pasv_xfer() using problem
by Kprasad other posts by this author
Jun 18 2009 6:52AM messages near this date
view in the new Beta List Site
Re: use case for activeState | RE: :FTP pasv_xfer() using problem
Hi

Please provide solution for below mentioned problem, message showing while executing below m
entioned 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 tran
sfer

$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
Thread:
Kprasad
Brian Raven

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved