Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Not getting List of files from Net::SFTP::Foreign

by syphilis (Chancellor)
on Sep 03, 2013 at 04:19 UTC ( #1052008=note: print w/replies, xml ) Need Help??


in reply to Not getting List of files from Net::SFTP::Foreign

You haven't checked to see whether the Net::SFTP::Foreign->new(...) call succeeded. If it fails, then $sftp won't be a hash reference.
You don't appear to have passed the password on. Do you need to ?

The documentation recommends using $ftp->error() to check that the new() call has succeeded:
$sftp = Net::SFTP::Foreign->new($host); $sftp->error and die "unable to connect to remote host: " . $sftp->err +or;
Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052008]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2017-10-18 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (250 votes). Check out past polls.

    Notices?