CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [BillKSmith] Anomaly while opening a file in read-write mode: Edit Log



Cupidvogel
Novice

Mar 24, 2012, 8:56 AM


Views: 1141
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)


Edit Log:
Post edited by Cupidvogel (Novice) on Mar 24, 2012, 8:57 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives