tell#

Synopsis#

$pos = tell($fh);    # position in $fh
$pos = tell();       # position in last-read filehandle

Description#

Returns the current byte position in a filehandle.

Returns the current read/write position (in bytes) for the given filehandle, or for the most recently read filehandle when called without arguments. Returns -1 on error or when no filehandle is available.

The returned value is suitable as the POSITION argument to seek.

See also#

seek, eof, sysseek