in reply to Unable to reuse STDIN
The Hello | is providing stuff on STDIN. You don't have anything in @ARGV because you have no command line arguments to pgm. Even if you did provide command line parameters things still wouldn't go your way - a file provided on the command line would be processed after the while loop and would provide the responses you hope to get from the user.
What is the big picture? What do you really want to achieve?
|
|---|