Call me confused, but the only "exec" I find in your program is in part of a string literal.
Assuming a POSIX system (and probably other Unix systems even if they aren't fully POSIX compliant, it may even hold for some non-Unix systems), filehandles are inherited by the execed process - unless they were marked "close on exec".
But one should realize that file handles are just numbers (well, this is Unix kernel stuff; Unix kernels are written in C; in C, everything is a number (or sequences of numbers); so it's not a surprise file handles are numbers). If your execed process is a Perl program, you'll have to dup a file handle (see perlopentut).
However, given the lack of an exec in your code, I don't really know what your question is.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||