in reply to Re: HowTo retrieve the position in a file from the FH
in thread HowTo retrieve the position in a file from the FH
Right. And we should get rid of the entire idea of filehandles-as-objects from perl6. Or is that the way we're going? I can't keep up.
Instead, as reasonablekeith reasonably pointed out, the solution really is to RTFM. Looking at IO::File shows that it derives from IO::Seekable, among others. Since that seemed like a logical next place to look, I went there, found the documentation on getpos, and saw that setpos was right there as well. I tried it out, and it worked wonderfully. I went to post, and noticed that reasonablekeith already had posted exactly that, so I left it alone.
(Alternate ways of doing things ++. Snide remarks about using a standard module --. Extending the argument ad absurdum, you get the idea to parse XML with built-in regular expressions in perlre because all the XML modules have their own and slightly different view of things and how things should work, when RTFM'ing will still get the job done quickly and reliably.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HowTo retrieve the position in a file from the FH
by BrowserUk (Patriarch) on Mar 13, 2006 at 17:45 UTC |