Re: Block Confusion
- From: japhy@xxxxxxxxxxxx (Jeff 'japhy' Pinyan)
- Date: Tue, 27 Sep 2005 20:20:02 -0400 (EDT)
On Sep 27, Ryan Frantz said:
# list the processes to hunt for my @findProcesses = ( "putty", "firefox", );
foreach my $process (in $serverObj->InstancesOf("Win32_PerfFormattedData_PerfProc_Process")) { foreach my $matchProcess ( @findProcesses ) { if ( $process->{Name} =~ /$matchProcess/oi ) {
You're using the /o modifier here, and that's causing your problem. I'm guessing you don't actually know what the /o modifier does. It tells Perl the regex won't change after it's been compiled the first time. Remove the /o modifier and I believe your code will run fine.
-- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://www.perlmonks.org/ % have long ago been overpaid? http://princeton.pm.org/ % -- Meister Eckhart .
- References:
- Block Confusion
- From: Ryan Frantz
- Block Confusion
- Prev by Date: Re: eval without warnings
- Next by Date: Re: eval without warnings
- Previous by thread: Block Confusion
- Next by thread: RE: Block Confusion
- Index(es):
Relevant Pages
|