in reply to Position in seek() confusion

You folks seriously told the OP to “de-parse” a Perl subroutine into its underlying bytecode-tree, assuring him or her that thereby it would be “obvious?”   Really??   ... :-/ ... Gee, you people really are nerds!

The one and only thing to remember about seek(), in any programming language at all, is that it works strictly on byte-positions within the file.   It does not know about newline sequences (in any of their one- or two-byte flavors ...), nor does it know about Unicode.   The file consists of nothing more and nothing less than a collection of zero-or-more bytes, and seek() sets the read/write cursor to an absolute or relative byte position within that collection.

Replies are listed 'Best First'.
Re^2: Position in seek() confusion
by Anonymous Monk on Jul 01, 2015 at 18:27 UTC
    You seriously replied to the OP indirectly? Not every context is a beginner's context. In this case, the OP was looking for deep knowledge and not just the Cliffs Notes. Can you not see this?
Re^2: Position in seek() confusion
by Anonymous Monk on Jul 01, 2015 at 18:40 UTC
    sundialsvc4:

    You folks seriously told the OP to “de-parse” a Perl subroutine into its underlying bytecode-tree, assuring him or her that thereby it would be “obvious?”   Really??   ... :-/ ... Gee, you people really are nerds!

    The one and only thing to remember about seek(), in any programming language at all, is that it works strictly on byte-positions within the file.   It does not know about newline sequences (in any of their one- or two-byte flavors ...), nor does it know about Unicode.   The file consists of nothing more and nothing less than a collection of zero-or-more bytes, and seek() sets the read/write cursor to an absolute or relative byte position within that collection.

    Poor flushells, you really don't know anything about B::Deparse, print, $/, -l

    Why starts at "column 0"? Why 78/80? Because \r\n is added