note
steves
<p>
And for yet another way: If you have <a href="http://search.cpan.org/~drolsky/Net-SSH-Perl-1.25/lib/Net/SSH/Perl.pm">Net::SSH::Perl</a> installed, you can also use a remote command like <i>cat</i>
(on a <b>*nix</b> system) to move files back and forth, since
<a href="http://search.cpan.org/~drolsky/Net-SSH-Perl-1.25/lib/Net/SSH/Perl.pm">Net::SSH::Perl</a>'s
<b>cmd</b> method lets you both capture standard output from
the remote command <i>and</i> supply a buffer to use
as standard input fed to the remote command.
<code>
# $data contains data from a local file to put in the
# remote file named by $to
($output, $error, $status) = $ssh->cmd("cat > $to", $data);
# On return, $output contains data from the remote file
# identified by $from (check status, etc. of course!)
($output, $error, $status) = $ssh->cmd("cat $from");
</code>
</p>
406243
406243