#!/usr/bin/perl use strict; use IO::Handle; autoflush STDOUT 1; # had to do this, even tho Open3 doc said it would be done already while (<>) { chomp; print "line $. to STDOUT: $_\n"; warn "mesg $. to STDERR\n"; }