In IO::CatHandle§

See primary documentation in context for method tell.

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 IO::CatHandle.new: $f1, $f2 {
    .get.say;                   # OUTPUT: «foo␤»
    .tell.say;                  # OUTPUT: «3␤»
    .seek: -2, SeekFromCurrent;
    .tell.say;                  # OUTPUT: «1␤»
    say .readchars: 3;          # OUTPUT: «oob␤»
    .tell.say;                  # OUTPUT: «2␤»
    }

In IO::Handle§

See primary documentation in context for method tell.

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

Return the current position of the file pointer in bytes.