Functions for working with IO::Handle like objects
