Subject: | get() does not return correct status for success |
When Net::SFTP get() function is called with a local file specified, the
code returns an empty string, instead of the file contents.
$status = $ftp->get($from,$to);
However this contradicts the documentation, which states:
Show quoted text
> If get is called in a non-void context, returns the contents of
$remote > (as well as writing them to $local, if $local is provided.
Undef is
Show quoted text> returned on failure.
This is a different action from Net::FTP, where the local filename is
returned on success.
I feel the Net::FTP method is much better than returning an empty string
on success... and much easier to code for success/failure.
Steven