in reply to Both read and write
You can't read text you've just written because the current position of the filehandle will be after the end of the text you've just written, so if you want to read it you have to seek back to the place you want to read from. At least, that's what I found in a quick test - I don't have much experience with this.
In Section
Seekers of Perl Wisdom