I've found the solution. If I remove the warn Dumper \%sections; and then change the comaprison to add the "m" flag after the pattern as below,
if ( $sections{"procs"} !~ /service.exe/m ) {
$color = "yellow";
$summary = "`/bin/date` CAWA Server service is not run
+ning.";
$statusmsg = "&yellow service.exe not running. Possibl
+e failover to ukclasce002. Inform OSG before 8:30am.\n\n" . $s
ections{"procs"};
}
else {
$color = "green";
$summary = "`/bin/date` CAWA Server service OK $os";
$statusmsg = "&green service.exe running ok.\n\n" . $s
+ections{"procs"};
}
This now works as expected. Thanks for the suggestions anyway.