Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Fixed-length unbuffered output ...Get current seekpointer on a d ... (Berikutnya)
Input and output functions

Get current seekpointer on a filehandle

Daftar Isi

  • tell FILEHANDLE

  • tell

    Returns the current position in bytes for FILEHANDLE, or -1 onerror. FILEHANDLE may be an expression whose value gives the name ofthe actual filehandle. If FILEHANDLE is omitted, assumes the filelast read.

    Note the in bytes: even if the filehandle has been set tooperate on characters (for example by using the :encoding(utf8) openlayer), tell() will return byte offsets, not character offsets (becausethat would render seek() and tell() rather slow).

    The return value of tell() for the standard streams like the STDINdepends on the operating system: it may return -1 or something else.tell() on pipes, fifos, and sockets usually returns -1.

    There is no systell function. Use sysseek(FH, 0, 1) for that.

    Do not use tell() (or other buffered I/O operations) on a filehandlethat has been manipulated by sysread(), syswrite(), or sysseek().Those functions ignore the buffering, while tell() does not.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Fixed-length unbuffered output ...Get current seekpointer on a d ... (Berikutnya)