use strict; # Read all the data from STDIN in the $buffer variable my $buffer = do { local $/; }; #Do a subtitution. $buffer =~s/essage/assage/sg; # Put $buffer back in STDIN so our system call can read it. # DOES NOT WORK. print STDIN "$buffer"; # Call our second program. unshift(ARGV,"printout.pl"); unshift(ARGV,"perl"); system @ARGV;