Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • it's clearly a random problem with PerlIO::gzip, sometimes it works and sometimes it doesn't. I can't make any sense of it, how can it work some of the time and the rest of the time it generates gibberish? yet you say I'm going to give IO::Uncompress::Gnuzip a go now to see if it's consistent and reliable.

    So, I infer, the cause of the observed problem is not clearly anything, as you don't yet have data ruling out other possible causes, because you've not yet tried the experiment of keeping everything else

    • Originally I thought that the same compressed file and the same Perl script could be run time after time and some of the time it would and some of the time it would not work. That really confused me, but it's a Windows box with an old version of ActiveState Perl on it, so I'm not expecting perfection.

      I now think that some files can and some can't be processed. Once you have a "bad" compressed file PerlIO::gzip can't deal with it, but other methods can.

      IO::Compress::Gunzip does work with the same file that PerlIO::gzip has problems with, so from my perspective that's the solution I'll use.

      I'm happy to help if I can, the problem is intermittent though, it's currently okay with the one example file and not happy with another. Cygwin gunzip is happy with both, I'm not sure what error correction gunzip does if any to keep going if there are problems.

      c:\perl -v

      This is perl, v5.8.8 built for MSWin32-x86-multi-thread
      (with 18 registered patches, see perl -V for more detail)

      Copyright 1987-2007, Larry Wall

      Binary build 822 [280952] provided by ActiveState
      Built Jul 31 2007 19:34:48

      Perl may be copied only under the terms of either the Artistic License or the
      GNU General Public License, which may be found in the Perl 5 source kit.

      Complete documentation for Perl, including FAQ lists, should be found on
      this system using "man perl" or "perldoc perl".  If you have access to the
      Internet, point your browser at, the Perl Home Page.

      C:\perl -MPerlIO::gzip -e "print $PerlIO::gzip::VERSION"

      I can email you an example gzip file if that would help. I'll also try the bad gzip file on another platform to see if it's a Windows problem or a more generic problem.

      -- "It's not magic, it's work..."