While the problem has been solved, it has not been explained. In the first line:
Reading <STDIN> in list context reads until the end of file for STDIN. At that point, you can no longer read from STDIN, so line 4 fails:
The solutions suggested either avoid using STDIN for user input (reading from the console) or close and re-open STDIN.
In reply to Re: STDIN problemo
by eye
in thread STDIN problemo
by ccdoub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |