Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Open a file on a specific file descriptor?

by benizi (Hermit)
on Jan 01, 2008 at 23:02 UTC ( [id://659891]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -lwe 'open STDOUT, ">&=6" or die ">&=6: $!"'
    >&=6: Bad file descriptor at -e line 1.
    $ perl -lwe 'open STDOUT, ">&=6" or die ">&=6: $!"' 6>/dev/null
    
  2. or download this
    # Don't use this - DOESN'T WORK
    open my $to_child, ">&=6" or die ">&=6: $!";
    open my $from_child, "<&=7" or die "<&=7: $!";
    ...
    } else {
        exec { "sub-program" } "sub-program", @args;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://659891]
Approved by Paladin
Front-paged by tye
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found