thank you for your help.
this is returning an error though,
"Can't locate Win32/Process/Info.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at E:\pscripts\proc.pl line 2. BEGIN failed--compilation
aborted at E:\pscripts\proc.pl line 2".
currently using activestate's v5.6.1 built for MSWin32-x86-multi-thread.
will look into it further.
once again, thank you for your help..
"Tomofumi Kitano" <to************@yahoo.com> wrote in message
news:a7**************************@posting.google.c om...
"Scaramouche" <sp*******@forgetIt.com> wrote in message
news:<Q0*******************@nwrddc02.gnilink.net>. ..
is there an equivalent to unixs' ps command in perl?
i was writing some win32 scripts and i needed a listing of specific
processes. i could perhaps grep through a list of running processes but
how can i attain that through perl?
thanks
I believe Win32::Process::Info will help you. For example,
use Win32::Process::Info;
my $pi = Win32::Process::Info->new();
my @info = $pi->GetProcInfo();
for my $pid (@info){
print $pid->{"Name"}."\n";
}