in reply to I wish to monitor and react according to windows "Task Manager"

OK
I have managed to get another computer and I installed ActivePerl on it
I installed al the moduls needed and I ran teh naxt code:
#!/usr/bin/perl -w use strict; use Win32::OLE; use Win32::Process::Info; my $pi = Win32::Process::Info->new (undef, 'WMI'); print $pi; my @info = $pi->GetProcInfo (); # Get the max relationships. for (my $p = 0; $p < scalar @info; $p++) { if (!($info[$p]{'ProcessId'})) { $info[$p]{'ProcessId'} = ''; } if (!($info[$p]{'Name'})) { $info[$p]{'Name'} = ''; } if (!($info[$p]{'ExecutablePath'})) { $info[$p]{'ExecutablePath'} = ''; } my $pid = $info[$p]{'ProcessId'}; my $pnm = $info[$p]{'Name'}; my $pex = $info[$p]{'ExecutablePath'}; print "ID:$pid\tNAME:$pnm\tExPath:$pex\n"; }

it runs and in the end I get the result I expect
but in the middle I get many warnings like this:

Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per l/lib/Time/Local.pm line 76.
Use of uninitialized value in pack at E:/Program Files/Perl/lib/Time/Local.pm li ne 67.
Use of uninitialized value in pack at E:/Program Files/Perl/lib/Time/Local.pm li ne 67.
Use of uninitialized value in integer addition (+) at E:/Program Files/Perl/lib/ Time/Local.pm line 67.
Use of uninitialized value in integer addition (+) at E:/Program Files/Perl/lib/ Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per l/lib/Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per l/lib/Time/Local.pm line 76.

and it is repetative
Please Help !!!
  • Comment on Re: I wish to monitor and react according to windows "Task Manager"
  • Download Code