# more transfer_file.pl
#!/usr/local/bin/perl
use strict;
use Net::FTP;
my $host = "myhost223";
my $user = "sam";
my $password = "Oc3@nT0p";
my $f = Net::FTP->new($host) or die "Can't open $host\n";
$f->login($user, $password) or die "Can't log $user in\n";
my $file_src = "/opt/billings.data";
my $file_dst = "/var/tmp/billings.data";
$f->binary;
$f->put($file_src,$file_dst) or die "Can't put $file_src to $file_dst\n";
#!/usr/local/bin/perl
use strict;
use Net::FTP;
my $host = "myhost223";
my $user = "sam";
my $password = "Oc3@nT0p";
my $f = Net::FTP->new($host) or die "Can't open $host\n";
$f->login($user, $password) or die "Can't log $user in\n";
my $file_src = "/opt/billings.data";
my $file_dst = "/var/tmp/billings.data";
$f->binary;
$f->put($file_src,$file_dst) or die "Can't put $file_src to $file_dst\n";
No comments:
Post a Comment