use strict; use warnings; use Win32::Process::Info; use Data::Dumper; my $pio_2 = Win32::Process::Info->new (); my @pids = $pio_2->ListPids (); my @proc_info; my @wantedInfoTypes = qw{ Name WorkingSetSize UserModeTime KernelModeTime }; my @InterestingExecutables = qw{ VISIO.exe cmd.exe notepad.exe skype.exe GoogleDesktop.exe wmplayer.exe }; for my $pid (@pids) { @proc_info = $pio_2->GetProcInfo($pid); for my $info (@proc_info) { grep /$info->{Name}/i, @InterestingExecutables or next; for my $infoType ( @wantedInfoTypes ) { print qq{\n$infoType => \n}, q{-} x length $infoType, qq{$info->{$infoType}\n}; } } }