in reply to Writing to descriptor 3
If you specify '<&=N', where N is a number, then Perl will
do an equivalent of C's fdopen() of that file descriptor;
this is more parsimonious of file descriptors. For example:
open(FILEHANDLE, "<&=$fd")
So
Should open a file handle to descriptor 3. If you really want more info on what exactly descriptors are then follow up, this should get you on your way.open(FHAND,'>&=3') || die ("Dead as a dead thing");
Update
Changed < for > in the open as tye points out the original question was for writing not reading .. *dowt*
--
Zigster
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Writing to descriptor 3
by tye (Sage) on Mar 06, 2001 at 21:48 UTC |