Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Complex file manipulation challenge

by Tux (Canon)
on Aug 13, 2019 at 18:24 UTC ( [id://11104406]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-23 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found