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 <> }". | [reply] [d/l] [select] |
You are absolutely right. I was, though, trying to hint towards the use of <> and $_, without providing the entire two-line program.
As for the 10x - I just #ifgnored it.
| [reply] [d/l] [select] |