lepetitalbert has asked for the wisdom of the Perl Monks concerning the following question:
can't get my way out the following :
$class = "winmgmts:{impersonationLevel=impersonate}\\\\$key\\Root\\c +imv2"; $process_info = Win32::OLE->GetObject( $class ) || warn "\n shit"; my $cnt = 0; foreach my $process ( sort { $a->{Name} cmp $b->{Name}} in( $process_info->InstancesOf( "Win32_Process" ))) { print LOG $process -> {Name} . "\n"; print LOG $process -> {ProcessID} . "\n"; print LOG $process -> {ExecutablePath} . "\n\n"; }
The thing is
$process -> {ExecutablePath}
can be empty (that causes the warning if I'm right). I can't test
if ( "" ne $process->{ExecutablePath} ) { ... }
cos warning again!
Hope someone can point out what am doing wrong.
Thanks
Have a nice day.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: unable to resolve warning "Use of uninitialized value in ..."
by Corion (Patriarch) on Oct 24, 2005 at 13:56 UTC | |
|
Re: unable to resolve warning "Use of uninitialized value in ..."
by jhourcle (Prior) on Oct 24, 2005 at 13:58 UTC | |
|
Re: unable to resolve warning "Use of uninitialized value in ..."
by jesuashok (Curate) on Oct 24, 2005 at 14:25 UTC | |
by lepetitalbert (Abbot) on Oct 24, 2005 at 14:45 UTC |