in reply to Re: Read from Input
in thread Read from Input

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 <> }".

Replies are listed 'Best First'.
Re: Re: Re: Read from Input
by pbeckingham (Parson) on May 07, 2004 at 16:10 UTC

    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.