Documentation for method seek

Documentation for method seek, assembled from the following types:

class IO::Handle

From IO::Handle

(IO::Handle) method seek

method seek(IO::Handle:D: Int:D $offsetSeekType:D $whence --> True)

Move the file pointer (that is, the position at which any subsequent read or write operations will begin) to the byte position specified by $offset relative to the location specified by $whence which may be one of:

The beginning of the file.

The current position in the file.

The end of the file. Please note that you need to specify a negative offset if you want to position before the end of the file.