Re: killing a program

2005-10-21 Thread Jeff 'japhy' Pinyan
On Oct 21, Christopher Spears said: I've been working on a script that will allow me to kill a certain program using the program's PID. sub findPID { if (my $PID = `pgrep PROGRAM`) { return $PID; } else { return 0; } } pgrep CAN return more

killing a program

2005-10-21 Thread Christopher Spears
I've been working on a script that will allow me to kill a certain program using the program's PID. #!/usr/bin/perl -w use strict; sub findPID { if (my $PID = `pgrep PROGRAM`) { return $PID; } else { return 0; } } my $fPID = &findPID(); if