Help for this page

Select Code to Download


  1. or download this
           '>pty>' means '&>pty>', not '1>pty>'
               The pseudo terminal redirects both stdout and stderr
    ...
               grab stderr separately, do this:
    
                  start \@cmd, '<pty<', \$in, '>pty>', \$out, '2>', \$err 
    +;
    
  2. or download this
    use IPC::Run qw(run);
    
    ...
        '>pty>', sub { $out .= $_[0]; print STDOUT $_[0] },
        '2>', sub { $err .= $_[0]; print STDERR $_[0] },
        );