|Just another Perl shrine|
TIEHANDLE problemby sgifford (Prior)
|on Apr 02, 2006 at 07:36 UTC||Need Help??|
sgifford has asked for the wisdom of the Perl Monks concerning the following question:
I'm having some trouble with tying a filehandle on Perl 5.6.1 (Debian Woody). The minimal testcase I've got is like this:
When I run it, I get:
It seemed to work for some other monks in the chatterbox, so it might be a version-specific problem.
Anybody have any ideas for making this work? All I'm really looking for is a way to make my filehandle objects work with regular perl file operations, like seek and angle-brackets.
The actual code emulates seek on a remote file via FTP, using the FTP REST and ABOR commands. If I open a ZIP file and pass it to Archive::Zip, it's able to read the table-of-contents of a multi-GB ZIP file and extract individual files without downloading the whole thing. I'm trying to get everything polished up for CPAN, and this is about the last thing on my list.
Update: Two more data points: First, everything besides READLINE works: read, getc, seek, tell, eof, etc. Second, everything works just fine on a perl 5.8.3 system I had handy.