Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I would like to open a file in perl and use the file descriptor, opened by the above perl open, in C system calls like read, write select etc. Is is possible to get the file descriptor from the perl FileHandle?. It would be helpful if you can suggest something in this regards Thanks, chand.
  • Comment on Can I get the file descriptor of a file from perl and use the same in system calls like read(), select() etc

Replies are listed 'Best First'.
Re: Can I get the file descriptor of a file from perl and use the same in system calls like read(), select() etc
by danger (Priest) on Jan 17, 2001 at 20:20 UTC

    You can get the file descriptor using the fileno function, and you can use it in conjunction with Perl's select call, but other I/O operations (like read) just use the filehandle itself.