in reply to Re^2: Complex file manipulation challenge
in thread Complex file manipulation challenge

I did not read the original problem statement :)

csv (in => $fh, out => undef, on_in => sub { ... }); supports streaming and does not store in memory (other than the current record. Rewriting my version to do that can be an exercise to the reader.

In preparation I found that PerlIO::via::gzip *only* supports open my $fh, ":via(gzip)", "file.gz"; and *not* open my $fh, ">", "file.gz"; binmode $fh, ":via(gzip)"; :( :(


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^4: Complex file manipulation challenge
by haukex (Archbishop) on Aug 13, 2019 at 18:54 UTC
    csv (in => $fh, out => undef, on_in => sub { ... }); supports streaming and does not store in memory

    Nice, good to know!

    I found that PerlIO::via::gzip *only* supports open my $fh, ":via(gzip)", "file.gz";

    Too bad, but IO::Compress::Gzip (core module) that I showed should support that AFAIK.