in reply to Edit a line of text
once you hit enter, the cursor moves to the next line, you can't go back.
so the solution is to read characters instead, and trap the newline
You may need to use Term::ReadKey or Win32::Console to accomplish this
Then you can print "\r", EditThisLine ... but be sure to pad the string so its at least as long it was before (add spaces on end)
You'll eventually have to advance the cursor yourself print "\n";
|
|---|