the objects provided by modules like IO::Scalar are not backed by real file descriptors at the OS level, and so, they can not be passed to C functions requiring open files as arguments (unless those functions have been modified to use PerlIO, but this is quite rare).