---------- Forwarded message ----------
From: Raheel Hassan <[email protected]>
Date: Wed, Aug 19, 2009 at 2:48 PM
Subject: This code is not giving the required output.
To: [email protected]
Hello,
I have problems in executing the under given code. I need to restart my
database, apache etc services using on ubuntu machine. for that i have
written thsi code, but the result of the command is not saving in the file ,
any suggestions please.
my $result = 'service mysql start 2>>/var/log/comm.log';
sleep 10;
if($result =~ /OK/)
{
print "OK";
}
else
{
print "NOK\n";
Regards,
Raheel.