Skip to content
Browse files

IPC::Open3 question in #perl-help

  • Loading branch information...
1 parent a842065 commit d4598fcaa16460af35e129016b9cb53cbbda3354 @jhannah committed Sep 12, 2009
Showing with 22 additions and 0 deletions.
  1. +11 −0 ryanrhee90/child.pl
  2. +11 −0 ryanrhee90/parent.pl
View
11 ryanrhee90/child.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use IPC::Open3;
+
+print "child here\n";
+open3(\*CHLD_IN, my $output, \*CHLD_ERR, "df -k 2>&1");
+while (<$output>) {
+ print $_;
+}
+
+
View
11 ryanrhee90/parent.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use IPC::Open3;
+
+print "launching child\n";
+open3(\*CHLD_IN, my $output, \*CHLD_ERR, "perl child.pl 2>&1");
+while (<$output>) {
+ print $_;
+}
+
+

0 comments on commit d4598fc

Please sign in to comment.
Something went wrong with that request. Please try again.