$mypid contains the status of the process not its pid.
--- [EMAIL PROTECTED] wrote: > I've
written a script to search for all *.pid files
> in a dir, then do
> a cat on the file. The script will then use this
> variable to kill the
> process. The problem I'm having is that the
> varibale is not being
> read correctly. I run the script and the kill
> process tries to run
> without the variable. Here is a post of the code I
> have. Anyhelp
> would be greatly appreciated.
>
>
> find(\&wanted,$dir);
>
> foreach my $afile (@dirstruct) {
> $mypid = system("cat $afile");
> chop($mypid);
> print "Killing instance...";
> system("kill $mypid");
>
>
> I wrote this script a few weeks ago and it worked
> great, but I accidentally
> deleted it and can't rememeber exactly how it was
> written. :-/
>
>
> --
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]