Rob, yes you are right. I apologize if that is not liked. I will not do so in future. I will atleast wait a couple of hours, before i go to any other forum.
your help is valuable to me. ty. Rajeev ________________________________ From: Rob Dixon <rob.di...@gmx.com> To: Rajeev Prasad <rp.ne...@yahoo.com>; perl list <beginners@perl.org> Sent: Monday, August 20, 2012 6:15 PM Subject: Re: re-reading from already read file handle Rajeev Prasad <rp.ne...@yahoo.com> wrote: >I opened a file to read from line by line. > > >open(FH,"<","$myfile") or die "could not open $myfile: $!"; >while (<FH>) >{ >...do something > >} > >later on in program, try to re-read the file (walk thru the file >again): >while (<FH>) >{ >...do something > >} > >and realized that it is as if the control within file is at the EOF and >will not iterate from first line in the file.... is this default >behaviour? how to work around this? file is big and I do not want to >keep in memory as array. so is my only option is to close and open the >file again? > >pl advice. >ty. >Rajeev This question is double-posted on Stack Overflow Rob -- This is sent from my phone. Please excuse the brevity.