This is the same problem as STDIN behaves different according to context, no? I think you're going to get the same responses that you received there: provide more information, because this code works fine as it is.
In reply to Re: Problems with <STDIN> in scalar context
by VSarkiss
in thread Problems with <STDIN> in scalar context
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |