Hi all,


I have problem in perl script when executing external bash script using backtick.


pscript.pl:

my $resultt = &execute();

print "RES: $result\n";


sub execute() {
 my $ret =  `/tmp/ping_yahoo.sh`;
 return $ret || "";

}


When run using cmmondline, it works (gives the correct output), but when scheduled using cron results is null/blank.

If try to redirect the stderr and stdout also, no luck.

 my $ret =  `/tmp/ping_yahoo.sh 2>&1`;


--

--beast


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to