in reply to Cleaner redirection of STDERR

On a note unrelated to the redirection of the output, is there any reason why you want to be using $$ as a parameter to this sub? $$ is global as the process id and you can access it from anywhere within the script. If you really want to be passing the pid of some other process, use a variable to indicate that, rather than changing $$.

Replies are listed 'Best First'.
Re: Re: Cleaner redirection of STDERR
by blakem (Monsignor) on Sep 23, 2001 at 16:44 UTC
    I think you are confusing the first occurance of '$$' and the second, in the code above. The first one is a function prototype, the second is the global var you mention. Prototyping isn't common in perl, so it looks a little funny, but the two '$$'s have nothing to do with one another.

    -Blake