develooper Front page | perl.beginners | Postings from August 2009

Fwd: This code is not giving the required output.

Thread Next
From:
Raheel Hassan
Date:
August 19, 2009 05:59
Subject:
Fwd: This code is not giving the required output.
Message ID:
fcb728f20908190559ha051643mfe0a0f01249064f4@mail.gmail.com
---------- Forwarded message ----------
From: Raheel Hassan <raheel.hassan@gmail.com>
Date: Wed, Aug 19, 2009 at 2:48 PM
Subject: This code is not giving the required output.
To: beginners-help@perl.org


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.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About