Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Parsing a large file 80GB .gz file and making an output file with specifice columns in this original file.

by salva (Monsignor)
on Jul 16, 2013 at 11:47 UTC ( #1044568=note: print w/ replies, xml ) Need Help??


in reply to Re: Parsing a large file 80GB .gz file and making an output file with specifice columns in this original file.
in thread Parsing a large file 80GB .gz file and making an output file with specifice columns in this original file.

why would you want to use the two-argument form when you can use the five-argument form?

open my $fh, '-|', 'gunzip', '-cd', $filename or die "Couldn't decompress '$filename' via gunzip: $! / $?";


Comment on Re^2: Parsing a large file 80GB .gz file and making an output file with specifice columns in this original file.
Download Code
Re^3: Parsing a large file 80GB .gz file and making an output file with specifice columns in this original file.
by Corion (Pope) on Jul 16, 2013 at 12:02 UTC

    I use the two-argument form because the three-argument form fails for me on Windows, unfortunately:

    >perl -we "my $fn= shift; open fh, '|-', 'gunzip', '-cd', $fh or warn +$!" foo.gz List form of pipe open not implemented at -e line 1.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-10-23 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls