Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL fileno Function



Syntax

fileno FILEHANDLE


Definition and Usage

Returns the file descriptor number (as used by C and POSIX functions) of the specified FILEHANDLE. This is generally useful only for using the select function and any low-level tty functions.

Return Value

  • File descriptor (numeric) of FILEHANDLE

  • undef on failure

Example

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

   if (fileno(THIS) == fileno(THAT)) {
	print "THIS and THAT are dups\n";
   }


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names