in reply to Searching strings within an array for a particular word.
You might also want to take a look at Watchdog.use strict; use Proc::ProcessTable; sub is_running { my ($pattern) = @_; my $t = Proc::ProcessTable->new(); foreach $proc ( @{ $t->table() } ) { $proc->cmndline() =~ /^$pattern/ and return 1; } return 0; }
stephen
|
|---|