>>>>> "RH" == Raheel Hassan <raheel.has...@gmail.com> writes:

  RH> Thanks a lot for your support, it works now i made change in *my $result 
=~
  RH> /[ OK ]/;* and now it works.
  RH> Because when you run the command *`service mysql start`* it gives output
  RH> like this [ OK ]. Therefore after making the required changes it works.

that is a broken regular expression. it is not matching the string '[ OK ]'
but a single letter which can be space, O or K. so it will match NOK as
well. you need to escape the [] so they are not forming a character
class.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to