in reply to Re^2: SFTP return value from shell to perl
in thread SFTP return value from shell to perl
In that case, you can use system by putting your commands into a batchfile for sftp. Untested:
my $batchfile = "/tmp/batchfile.$$"; open my $bfd, '>', $batchfile or die $!; print $bfd <<EOF; put $gz_filename $dest_path bye EOF close $bfd; my $return_value = system('sftp', "-b $batchfile", $host); unlink $batchfile;
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: SFTP return value from shell to perl
by Anonymous Monk on Apr 06, 2012 at 12:37 UTC |