Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

How do you properly tty-ify a non-tty STDOUT?

by ph713 (Pilgrim)
on Sep 22, 2004 at 15:52 UTC ( [id://392942]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use IO::Pty;
    use IO::Handle;
    ...
    STDOUT->fdopen($slave,'w') || die $!;
    $pty->fdopen(\*REAL_STDOUT,'w') || die $!;
    system("echo This is stdout output from an external program");
    
  2. or download this
    use IO::Handle;
    use IO::Pty;
    ...
    
    my $fh = do_cmd();
    while(<$fh>) { print; }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-20 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found