in reply to In-Place Editing Problem

Thank you for your help. I found the problem. I used 'readline' in another other subroutine to gather some input from STDIN, but failed to include a file handle. That routine worked fine, but apparently it did not close properly when the code exited the routine and so when I called the subroutine above, it continued to read from STDIN. The problem was fixed by changing 'readline' to <STDIN>. It appears that when I used 'readline' without a file handle, it used whatever was in $_ as a file handle and then didn't close it upon returning from the subroutine? Anyway, good lesson learned.