http://qs321.pair.com?node_id=103258


in reply to sftp problem

According to the Net::SFTP documentation:

$local is optional. If not provided, the contents of the remote file $remote will be either discarded, if get is called in void context, or returned from get if called in a non-void context. Presumably, in the former case, you will use the callback function \&callback to "do something" with the contents of $remote.

Your first example calls it in void context without providing a $local, thus nothing useful happens.