#the Main script to run #!/usr/bin/perl -w $|++; open( H, " | other_script") or die "$!\n"; print H "hi\n"; sleep 1; #let other script print before dieing __END__ ##################################### #the other_script #!/usr/bin/perl $|++; my $in = <>; print "$in\n" __END__