in reply to Re^3: Net::SFTP::Foreign mod perl
in thread Net::SFTP::Foreign mod perl
I do agree that ENV vars do have something to do with this, but haven't seen anything here or off of a google search to tell me which ones it would be. Again thank you for your suggestions.my $sftp = Net::SFTP::Foreign->new(host =>$host, password => $password +, user => $username, ssh_cmd => 'ssh', more => [-v], port=>22); # or +die "Cannot connect to $@"; warn( "####################### Connected #######################\n") +; #$sftp->put("file.txt", "file.txt", copy_perm => 0);# or die "Cannot +connect to $@"; + my @files = $sftp->ls(); foreach my $f ( @files ) { foreach my $file_ref ( @{$f} ) { print "Found file: " . $file_ref->{'filename'} . "<br>\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Net::SFTP::Foreign mod perl
by perrin (Chancellor) on May 21, 2009 at 21:20 UTC |