Nadir has asked for the wisdom of the Perl Monks concerning the following question:

I'm working with this on a linux platform and portability is not a priority.

Is it possible to get filehandles back after a call to exec? I've used execl in C previously to do this, but
my attempts to replicate this functionality in perl have failed thus far. Is there similar functionality in perl?
If so, can someone show me an example?

Thanks,
-Nadir

Replies are listed 'Best First'.
Re: getting filehandles back after exec
by Fastolfe (Vicar) on Feb 06, 2001 at 01:28 UTC
    I suspect you want the $^F variable. It sets the maximum "system" file descriptor. That is, the highest numbered file descriptor to "leave open" after a call to exec (or open for that matter), meaning the next process inherits open files using these descriptors/numbers.