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.
In reply to Re^2: A simple foreach question
by betterworld
in thread A simple foreach question
by newperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |