Welcome to the Monastery | |
PerlMonks |
Re: Openind file for read+appendby Eliya (Vicar) |
on Feb 08, 2012 at 18:37 UTC ( [id://952552]=note: print w/replies, xml ) | Need Help?? |
Opening a file for appending positions the file pointer at the end of the file. If you also want the read its contents, you have to seek to the beginning (or wherever you want to) before reading. (The OS maintains only one file pointer per file handle, not one for reading, and one for writing.)
In Section
Seekers of Perl Wisdom
|
|