in reply to Re: A simple foreach question
in thread A simple foreach question

I think your problem is that <STDIN> is not returning an list.
This is not exactly true. <STDIN> does return a list because it is called in list context. The list are the lines of input. For further details, see the other comments.