in reply to Reopen file when contents changed?
If you're on a system that supports it it might be more efficient to see if you could use SGI::FAM, or look into wrapping kqueue on a BSD box using Inline::C. That'd let the OS notify you just when it changes.
Update: Oh, just read that you're reading stuff from /proc; never mind as my suggestions probably won't work there.
--
We're looking for people in ATL
In Section
Seekers of Perl Wisdom