V
vabby
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.
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.