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; }