Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to get file descriptor (number)

by dave_the_m (Monsignor)
on Sep 13, 2005 at 10:25 UTC ( [id://491541]=note: print w/replies, xml ) Need Help??


in reply to How to get file descriptor (number)

$ perldoc -f fileno fileno FILEHANDLE Returns the file descriptor for a filehandle, or undefined if the filehandle is not open. This is mainly useful for con- structing bitmaps for "select" and low-level POSIX tty-handling operations. If FILEHANDLE is an expression, the value is taken as an indirect filehandle, generally its name. 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"; } (Filehandles connected to memory objects via new features of "open" may return undefined even though they are open.)

Dave.

Replies are listed 'Best First'.
Re^2: How to get file descriptor (number)
by Eyck (Priest) on Sep 13, 2005 at 12:39 UTC
    Thanks, that is exactly it!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://491541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-19 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found