Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > using ftp from perl script

Reply
Thread Tools

using ftp from perl script

 
 
vabby
Guest
Posts: n/a
 
      03-27-2007
Hi
I need to use ftp from perl script. below is the script.

#!/opt/perl-5.600/bin/perl
use strict;

use Carp;
use Socket;
use FileHandle;
use File::Basename;
use File:ath;
use Sybase:Blib;
print "FTP sequence initiated\n";

my $host = 'destination.remoste.host.com';
my $usr = ''user_name';
my $pass = 'passwd';
my $file = 'ftpfile.txt';
`ftp -n $host >/home/apariv/perl_learning/ftp.log <<END_SCRIPT`;
`user $usr`;
`$pass`;
`lcd /home/apariv/perl_learning`;
`put $file`;
`quit`;
#END_SCRIPT

the script runs fine w/o any error.ftp.log file remains empty and
there is no file copied to the remote host. can u plz help m efind out
the error.

 
Reply With Quote
 
 
 
 
vabby
Guest
Posts: n/a
 
      03-27-2007
tx for the reply . CPAN ftp module is gr8 and has solved my problem

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in passing values to perl script using another perl script vikrant Perl Misc 4 08-10-2005 06:20 PM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM
problem calling perl script from SOAP server perl script pj Perl Misc 3 04-09-2004 10:23 PM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57