method tell
Documentation for method tell
assembled from the following types:
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 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» }
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.