home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / ftp < prev    next >
Encoding:
Text File  |  2004-06-01  |  392 b   |  22 lines

  1. #!/usr/local/bin/perl
  2.  
  3. use blib;
  4. use Net::FTP;
  5. use Getopt::Long;
  6.  
  7. $opt_debug = undef;
  8. $opt_firewall = undef;
  9.  
  10. GetOptions(qw(debug firewall=s));
  11.  
  12. @firewall = defined $opt_firewall ? (Firewall => $opt_firewall) : ();
  13.  
  14. foreach $host (@ARGV)
  15.  {
  16.   $ftp = Net::FTP->new($host, @firewall, Debug => $opt_debug ? 1 : 0);
  17.   $ftp->login();
  18.   print $ftp->pwd,"\n";
  19.   $ftp->quit;
  20.  }
  21.  
  22.