GrahamBright
Programmer
Hi all,
I'm trying to execute remotely commands from a perl/cgi script.
Working example (perl only)
$DATE=`exec rsh 10.236.137.41 date `;
however within my perl/cgi program if I try to print the value of DATE I get nothing back
Whats strange:
sub check_DATE()
{
open(MDATE, ">>$output") || die "Cannot open log file $!";
($MSISDN) = @_;
$DATE=`exec rsh 10.236.137.41 date`;
print DATE "date is $DATE";
close DATE;
}
resulting flat file contains only "date is " ?
If I provide an invalid IP address I can see that the webpage hangs, so it would appear that rsh is succeeding but no value for DATE.
Can you help or suggest alternatives where I can remotely execute commands from within a perl/CGI script.
Thanks,
Graham.
I'm trying to execute remotely commands from a perl/cgi script.
Working example (perl only)
$DATE=`exec rsh 10.236.137.41 date `;
however within my perl/cgi program if I try to print the value of DATE I get nothing back
Whats strange:
sub check_DATE()
{
open(MDATE, ">>$output") || die "Cannot open log file $!";
($MSISDN) = @_;
$DATE=`exec rsh 10.236.137.41 date`;
print DATE "date is $DATE";
close DATE;
}
resulting flat file contains only "date is " ?
If I provide an invalid IP address I can see that the webpage hangs, so it would appear that rsh is succeeding but no value for DATE.
Can you help or suggest alternatives where I can remotely execute commands from within a perl/CGI script.
Thanks,
Graham.