Documentation for routine tell

Documentation for routine tell, assembled from the following types:

class IO::Handle

From IO::Handle

(IO::Handle) method tell

Defined as:

method tell(IO::Handle:D: --> Int:D)

Return the current position of the file pointer in bytes.

class IO::CatHandle

From IO::CatHandle

(IO::CatHandle) method tell

Defined as:

method tell(IO::CatHandle:D: --> Int:D)

Calls .tell on the currently active source handle and returns the result. Returns Nil if the source handle queue has been exhausted.

(my $f1 = 'foo'.IO).spurt: 'foo';
(my $f2 = 'bar'.IO).spurt: 'bar';
with $f1$f2 {
    .get.say;                   # OUTPUT: «foo␤» 
    .tell.say;                  # OUTPUT: «3␤» 
    .seek: -2SeekFromCurrent;
    .tell.say;                  # OUTPUT: «1␤» 
    say .readchars: 3;          # OUTPUT: «oob␤» 
    .tell.say;                  # OUTPUT: «2␤»