|laziness, impatience, and hubris|
System call scp error 256by srchulo (Sexton)
|on Dec 05, 2011 at 00:10 UTC||Need Help??|
srchulo has asked for the
wisdom of the Perl Monks concerning the following question:
I am running an scp command in my script to copy a file to a remote server. However, whenever I run it from a Perl script, I get a value of 256 returned and it does not work. Yet when I run the exact same command on the command line, I get a value of 0 returned and it works properly.
Does anyone have any idea what the issue could be? Here is the code that I am running:
my $result = `/usr/bin/perl /path/to/script/remote_copy.pl file=1323036682.png remotehost=otherserver localpath=/tmp/ remotepath=/path/to/images`;
remote_copy.pl is a script that just runs scp. Like I said, this exact command runs on command line, just does not work in Perl. I am working in a mod_perl environment if that helps at all.