in reply to Re^4: In memory filehandles
in thread In memory filehandles

You'd probably be best off just using IO::String.

It looks to me like Archive::Zip would have the same problem with any filehandle opened with the open builtin, even disk files; is this the case?

Replies are listed 'Best First'.
Re^6: In memory filehandles
by polettix (Vicar) on Jan 27, 2006 at 11:32 UTC

    The workaround with IO::File worked fine, and it doesn't require the installation of external modules in recent perls. While probably not the best for long-term production code, I find it better for example scripts that can work with the least requirement for the user.

    About open() you're right... probably. One of the thousands things I tried involved using File::Temp to get a temporary, "real-file" handle, but the readFromFileHandle() method continued to complain. I had to use the filename given back by File::Temp instead of the filehandle.

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.