for (1..3) { print "$_: "; system( qw( perl -we ), q{ while (1) { my $bytes = sysread(STDIN, my $c, 1); last if $bytes <= 0 || $c eq "\n"; print $c; } } ); print "\n"; }