Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use strict;
- use warnings;
- use Net::FTP;
- my $host = '192.168.55.94';
- my $user = 'test';
- my $pass = 'pass';
- my $fn = '/home/test/scripts/ftp/file.txt';
- # Open the connection to the host
- my $ftp = Net::FTP->new($host, PORT => 21);
- $ftp->login($user, $pass);
- $ftp->binary;
- $ftp->put($fn, 'file.txt');
- $ftp->quit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement