in reply to convert shell to perl

Here is a little cleaner way to handle the killing of the processes.
#!/usr/bin/perl -w use Proc::ProcessTable; my $t = new Proc::ProcessTable; foreach my $p (@{$t->table}){ kill SIGKILL => $p->pid if $p->cmndline and $p->cmndline =~ /netscap +e/; }
--eric