It is almost certainly not reading the prompt back in. It may look like it is, as an artifact of end-of-line processing. Modify the print statement to look like this and see what you get:
print "\nYou entered \n|$number|\n";
See what's between the two '|' symbols, I'll bet it doesn't include the prompt. Or try chomp $number; before the print.
--Bob Niederman, http://bob-n.com | [reply] [d/l] [select] |
bobn, I tried your suggestion, but it didn't fix the problem. However, Thelonius has said that this is a problem with the Open Perl IDE that I used, not Perl itself or my Windows system's port of it. And when I used a freeware Perl frontend for Win32 systems, the problem did not occur.
| [reply] |