If I may suggest a strategy: pretend that we know absolutely nothing about computers, but are instead going to describe the situation to someone else. The other person will respond and then we tell you what they said.
What happens here is that if you want a useful answer, without a bunch of monks taking wild shots, you're forced to explain explicitly what you need. For example:
- After my program has read in several lines from a file, is there a way I can get it to start reading from the beginning of the file without closing and then reopening it?
- After I open a file, How do I just read X amount of lines/characters/bytes, etc.
- I accidentally shot my boss. Can anyone tell me where I can download the Evidence::Conceal module?
Interestingly, one of the reasons that so many monks insist upon "Seekers" posting there code is not because they need to see the code to tell the Seeker what is going on. Rather, many monks ask for the code because the Seeker has not been able to explain what /s?he/ really needs. This is unfortunate because then, the code that we see may innacurately reflect the Seekers needs, but it is the best we can do.
Please don't take this personally. If our answers above didn't help you, perhaps reword your question or (dare I say it?) post any code sample you have.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. | [reply] |
To reposition the file-pos indicator use seek in IO::Seekable something like
seek (FHANDLE,0,SEEK_SET)
HTH
--
Zigster | [reply] [d/l] |
What do you mean by the beginning of a file? The first line,
first ten lines? Inode number?
- Ant | [reply] |