in reply to PerlIO::gzip can't handle appended stuff

AFAICT from Bug #90480, I think PerlIO::gzip may not support this. I usually use the core modules IO::Compress::* and IO::Uncompress::*. Their objects can also be used like filehandles - this works for me:

use IO::Uncompress::Gunzip (); my $in = IO::Uncompress::Gunzip->new('tst.gz', MultiStream=>1 ) or die "$IO::Uncompress::Gunzip::GunzipError"; print while <$in>; close $in;

Replies are listed 'Best First'.
Re^2: PerlIO::gzip can't handle appended stuff
by Skeeve (Parson) on Apr 16, 2021 at 12:21 UTC

    I already tried that as well and it also just prints the first part.

    It works! Thanks!

    Just have to add Multistream like so:

    my $in = new IO::Uncompress::Gunzip "tst.gz", Multistream => 1 or die "IO::Uncompress::Gunzip failed: $GunzipError\n"; print while <$in>;