Did this example get frobbed in the posting? $pid is never assigned to or declared, and that <STDIN>; all by itself looks mighty strange. Oh, and it doesn't seem to work. :)
I think I see what you're aiming at, though.
Comment on Re: Re: Taming multiple external processes