srchulo has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
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.
Many thanks
srchulo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: System call scp error 256
by roboticus (Chancellor) on Dec 05, 2011 at 00:17 UTC | |
by srchulo (Sexton) on Dec 05, 2011 at 20:38 UTC | |
|
Re: System call scp error 256
by keszler (Priest) on Dec 05, 2011 at 00:53 UTC |