Help for this page

Select Code to Download


  1. or download this
    C:\test>type junk
    Press any key to continue . . .
    
  2. or download this
    $pipe->reader( 'yourprog arg arg | tee CON' );
    
  3. or download this
    C:\test>perl -MIO::Pipe -we"$p=IO::Pipe->reader('(pause & dir z)|tee C
    +ON');@i=<$p>;print qq[Got '$_']for @i"
    Press any key to continue . . .
    ...
    'Got ' Directory of C:\test
    'Got '
    '
    
  4. or download this
    $pid=open CMD, "$cmd |"; 
    @input = <CMD>;
    
  5. or download this
    C:\test>perl -e"$pid=open CMD,q[(pause & dir z)|tee CON |];@i=<CMD>;pr
    +int qq[Got '$_']for @i"
    Press any key to continue . . .
    ...
    'Got ' Directory of C:\test
    'Got '
    '