windows 守护进程

ppm install Win32::Process::List;
use Win32::Process::List;
my $P=Win32::Process::List->new();
my %list = $P->GetProcesses();    # returns the hashes with PID and process name
foreach my $key ( keys %list ) {
# $list{$key} is now the process name and $key is the PID
print sprintf("%30s  PID %15s", $list{$key}, $key)."
";
};

原文地址:https://www.cnblogs.com/hzcya1995/p/13349716.html