kevind0718 has asked for the wisdom of the Perl Monks concerning the following question:
When I run this code I get:use strict; use warnings; use Net::SFTP; my $SFTPSite = 'sftp.primebroker.com' ; my $userid = 'fred'; my $pword = 'bedrock'; my $entry = undef; #** ** ** ** ** ** ** ** # Setup to do the SFTP my $sftp = Net::SFTP->new( $SFTPSite, user=>'fred', password=>'barney' +, debug=>1) or die "Could NOT create SFTP " ; #Net::SFTP const +ructor my @entries = $sftp->ls('/'); # slurp all entries into an array foreach $entry (@entries) { print "$entry \n"; chomp $entry; my @fields = split /\s+/, $entry; print "the file name: " . $fields[-1] . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SFTP under Windows
by Anonymous Monk on Aug 27, 2008 at 14:56 UTC |