
Cupidvogel
Novice
Mar 24, 2012, 8:56 AM
Views: 944
|
|
Re: [BillKSmith] Anomaly while opening a file in read-write mode
|
|
|
Can you dissect the logic of the code to say where it is gowing wrong? The plus sign enables both reading and writing, right? After reading two lines (by implicitly comparing $.), the file pointer should be at the starting of 3rd line, right ? (In fact, just for cross-checking, if the next line after the loop is print <f> the 3rd line is indeed printed out. So no issue there too) Now that the file pointer is at the beginning of the 3rd line, why can't I write something at that position? More importantly, how the code is yielding the current output?
(This post was edited by Cupidvogel on Mar 24, 2012, 8:57 AM)
|