#!/usr/bin/perl my ($cmd1,$cmd2)=@ARGV; pipe READHANDLE,WRITEHANDLE; my $pid= fork(); if($pid == 0){ my $input; print "child: I am the child\n"; close(READHANDLE); while(<>){ print "child: sending $_"; s/This/That/; tr/a-zA-Z/A-Za-z/; print WRITEHANDLE $_; } close(WRITEHANDLE); exit; } else { my $input; print "parent: I am the parent and the child has the pid of $pid\n"; close(WRITEHANDLE); while(){ print "parent: $_"; } close(READHANDLE); exit; }