Actually in your program <> is interpreted in list context, because this is standard context for print. This means that nothing is outputted until the user enters ^Z (or whatever else end of input is). You might want to go with perl -e "for (1..10) { print scalar <> }".