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?
I suspect you want the $^Fvariable. 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.