Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Test a filehandle for its endLock an entire file with an ad ... (Berikutnya)
Input and output functions

Return file descriptor from filehandle

Daftar Isi

  • fileno FILEHANDLE

    Returns the file descriptor for a filehandle, or undefined if thefilehandle is not open. If there is no real file descriptor at the OSlevel, as can happen with filehandles connected to memory objects viaopen with a reference for the third argument, -1 is returned.

    This is mainly useful for constructingbitmaps for select and low-level POSIX tty-handling operations.If FILEHANDLE is an expression, the value is taken as an indirectfilehandle, generally its name.

    You can use this to find out whether two handles refer to thesame underlying descriptor:

    1. if (fileno(THIS) == fileno(THAT)) {
    2. print "THIS and THAT are dups\n";
    3. }
 
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) Test a filehandle for its endLock an entire file with an ad ... (Berikutnya)