in reply to ftp issue in perl
use strict; use warnings; use Net::FTP; my $hostname = 'ftp.check.com'; my $username = 'check'; my $password = 'check'; # Hardcode the directory and filename to get my $home = '/ToFTP'; # Open the connection to the host my $ftp = Net::FTP->new($hostname); # construct object $ftp->login($username, $password); # log in #$ftp->cwd($home) or # die "Can't change directory ($home):" . # $ftp->message; my $pwd = $ftp->pwd; my @ls = $ftp->ls('-lR'); foreach (@ls) { print "$_\n"; } $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ftp issue in perl
by namishtiwari (Acolyte) on Jul 27, 2009 at 11:32 UTC |