http://www.perlmonks.org?node_id=488183


in reply to converting perl file handle into C FILE *

You can use the XS::Typemap module, and use the convertion function T_STDIO to convert perl I/O structure to FILE * structure to pass to your XS.