in reply to Re: help with Net::SFTP
in thread help with Net::SFTP
use strict; use warnings; use Net::SFTP; my $SFTPSite = 'sftp.xxxxbroker' ; my $userid = 'fred'; my $pword = 'bedrock'; my $entry = undef; #** ** ** ** ** ** ** ** # Setup to do the SFTP my $sftp = Net::SFTP->new( $SFTPSite, $userid, $pword ) 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^3: help with Net::SFTP
by andyford (Curate) on Jan 15, 2008 at 19:23 UTC | |
by Anonymous Monk on Jan 15, 2008 at 20:21 UTC | |
by salva (Canon) on Jan 16, 2008 at 15:30 UTC | |
by Anonymous Monk on Feb 11, 2008 at 10:04 UTC | |
by marto (Cardinal) on Feb 11, 2008 at 10:15 UTC |