ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/staticperl/perl/lib/Net/demos/ftp
Revision: 1.1
Committed: Thu Jun 30 14:27:14 2005 UTC (21 years, 4 months ago) by root
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.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