in reply to Best way to implement ungetstring?

In general, you could have a buffer associated with each file handle. You could then overload any get* routines to look at your buffer first, and if that's empty do the operation on the file. Ungetting at that point is just filling that buffer. Looking at what we have, it looks like you'd want to implement this as a wrapper to IO::Handle. Also, from what I recall, seek clears EOF...

thor