Created
March 16, 2015 21:53
-
-
Save tartansandal/1f2582c4fca42719925e to your computer and use it in GitHub Desktop.
Trigger error hidding with Net-FTP- 2.77
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Net::FTP; | |
use Devel::SimpleTrace; | |
my $server = 'ftp.arin.net'; | |
my $passive = 1; # <<< toggle this ;-) | |
my $file_name = 'T*'; # <<< but make sure that there are no T* files in the dir. | |
my $dir = '/pub/stats'; | |
my $ftp = Net::FTP->new($server,Debug=>3,Passive=>$passive) or die "Cannot connect to $server: $@"; | |
$ftp->login("anonymous",'-anonymous@') or die "Cannot login ", $ftp->message; | |
$ftp->cwd($dir) or die "Cannot change working directory ", $ftp->message; | |
my $res = $ftp->ls($file_name) or die $ftp->message; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment