Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
"be consistent"
 
PerlMonks  

Re: (bbfu) Re(3): 'seek' on a FileHandle.pm object

by dsb (Chaplain)
on Apr 17, 2001 at 19:16 UTC ( [id://73303]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to (bbfu) Re(3): 'seek' on a FileHandle.pm object
in thread 'seek' on a FileHandle.pm object

One more:
Does 'byte position' apply only to the position of the beginning of the line, or the position of any single byte within the file?

Amel - f.k.a. - kel

  • Comment on Re: (bbfu) Re(3): 'seek' on a FileHandle.pm object

Replies are listed 'Best First'.
(bbfu) (meaning of byte position) Re(5): 'seek' on a FileHandle.pm object
by bbfu (Curate) on Apr 17, 2001 at 19:27 UTC

    Any byte, anywhere in the file.

    One thing to note is that seek resets the state of the filehandle, including errors, eof, as well as Perl's internal idea of whether or not it should append the filehandle to any warnings or error messages (see Re: Closing and re-opening the DATA Filehandle). That's why you might see the no-op seek (seek $fh, 0, 1) used occasionally for such things.

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://73303]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.