Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    use IPC::Open3;
    ...
        
        waitpid( $pid, 0 );
    }
    
  2. or download this
    Line 1
    This is the first line
    Line 2
    This is the second line
    Line 3
    This is the third line
    
  3. or download this
    sub test_mod {
        my $line = shift;
    
    ...
        local $\;
        print STDOUT $content;
    }
    
  4. or download this
    STDOUT: Line 1
    This is the first line
    
    ...
    This is the third line
    
  5. or download this
    sub single_thread {
        for my $line (@_) {
            my $pid = open3(my $wtr, my $rdr, undef, 'cat', '-v');
    ...
            print "STDOUT: $content\n";
        }
    }
    
  6. or download this
    STDOUT: Line 1
    This is the first line
    
    ...
    STDOUT: Line 3
    This is the third line