Hi Mark!
I had the same problem. Maybe this is also a solution for you.
$ssh->login("XXXXX", "XXXXXXX");
my $localFile = 'file-to-copy';
my $remoteFilename = 'target-file-name';
# Read content from source file
my $data;
open(SCP,$localFile);
while (<SCP>) {
$data .= $_;
}
close(SCP);
# "Print" out $data on remote STDIN. Redirect STDIN to a regular file using cat
my ($out, $err, $exit) = $ssh->cmd("/bin/cat > " . $remoteFilename,$data);
I've used md5sum to ensure that the src files and dst files are identical.
Cheers,
Christian Schaefer