in reply to Re^2: No interactivity (prompt) after reading from pipe
in thread No interactivity (prompt) after reading from pipe

Have a look at seek, pp. 779-780 in Programming Perl, 3rd edition.
  • Comment on Re^3: No interactivity (prompt) after reading from pipe