# a quick hack to print the status of all services running on a machine
format top =
Status of Service:

Service Status Name       Status Value         Service
_____________________________________________________________________________
.
format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<< @||| @<<<<<<<<<<<<<< @||| @<<<<<<<<<<<<<<<<<<<<<<<<<
$key2,                   '=', $status{$key2}  '->' $key1
.
use Win32::Service;
print "\n\n";
if (@ARGV) {
   while (@ARGV) {
      &PrintStatus(shift);
      print "\n";
   }
} else {
   Win32::Service::GetServices('', \%list) || &Error($!);
   foreach $key (keys %list)
   {
      &PrintStatus($list{$key});
      print "\n";
   }
}
print "\n\n\n";
   sub PrintStatus {
      local($key1) = @_;
      Win32::Service::GetStatus('', $key1, \%status) || &Error($!);
      foreach $key2 (keys %status) {
         write;
      }
   }
   sub Error {
      use Win32;
      local($err) = @_;
      if ($err != 2) {
         Win32::FormatMessage(Win32::GetLastError());
      }
   }


    Source: geocities.com/siliconvalley/park/8312

               ( geocities.com/siliconvalley/park)                   ( geocities.com/siliconvalley)