Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2. use strict;
  3. use warnings;
  4. use Net::FTP;
  5. my $host = '192.168.55.94';
  6. my $user = 'test';
  7. my $pass = 'pass';
  8. my $fn = '/home/test/scripts/ftp/file.txt';
  9. # Open the connection to the host
  10. my $ftp = Net::FTP->new($host, PORT => 21);
  11. $ftp->login($user, $pass);
  12. $ftp->binary;
  13. $ftp->put($fn, 'file.txt');
  14. $ftp->quit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement