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
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>