LostUser has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am new to Perl. I searched around for a fix to my issue but could not find it. I am using the win32.pm in order to read single keystroke input to move a cursor around a console screen and it works great. However, I also need to read a line of input for the player name. STDIN seems to hang when I use the Win32.pm though it does not error nor does it respond any longer once I try to use it and I have to break out of the program. Here is my code.
#!/usr/bin/perl require Term::Screen::Win32; #This pm is used for single key input, specific screen location # and other screen manipulations (clrscr() clears screen) $scr = new Term::Screen::Win32; #This sets up $scr with the screen acc +ess commands using Win32.pm unless ($scr) { die " Something's wrong \n"; } $scr->clrscr(); while (length($ans)<9) { $scr->at(0,0); print "Type something here: \n"; $ans = $scr->getch(); if ($ans =~ "\r") {print"True";} $newval .= $ans; $scr->at(1, 0); print $newval; }#end while $scr->at(2,0); print "Enter something: "; $response = <stdin>; print $response,"\n";
What I want, is to be able to read a single keypress to move the cursor around the screen and also be able to input a name/word. I have also tried saving the continuous key input but checking for \r doesn't seem to work unless the Win32.pm echo() is used. So with echo(), there may be a way to get a full line of text rather than just a single character. I am still tinkering. Any thoughts or advice would be appreciated.