Win32::Process::List - Perl extension to get all processes and thier PID on a Win32 system
use Win32::Process::List; my $P = Win32::Process::List->new(); constructor my @list = $P->GetProcesses(); returns an array of hashes my %h = %{ $list[0] }; get the hash with processname and pid foreach my $pr ( keys %h ) { print "Process $pr has PID " . $h{$pr} . "\n"; } my $PID = $P->GetProcessPid("explorer"); get the PID of process explorer.exe my $np = $P->GetNProcesses(); returns the number of processes
Win32::Process::List is a module to get the running processes with their PID's from a Win32 System. Please look at Win32/Process/List/processes.pl.
None by default.
Reinhard Pagitsch, <rpirpag@gmx.at>
perl.