in reply to Re: how to reset the input operater in while loop?
in thread how to reset the input operater in while loop?

Assuming the file is seekable (if it's not, you cannot do what you want) …
Why wouldn't GrandFather's approach of close-ing and re-opening work even if the filehandle is non-seekable?

UPDATE: Thanks to JavaFan for a very polite answer to a very silly question.

Replies are listed 'Best First'.
Re^3: how to reset the input operater in while loop?
by JavaFan (Canon) on Sep 30, 2008 at 21:24 UTC
    Because non-seekable usually means the data can only be read only once. Examples of non-seekable handles are (named) pipes, STDIN (usually) and network sockets.