in reply to using zcat for input?
You would want to open it as piped input, such as the following:
open(IN, sprintf("zcat %s |", $filename)) or die("Can't open pipe from command 'zcat $filename' : $!\n"); while (<IN>) { # process lines } close(IN);
See also the documentation for the open() function (also available via 'perldoc -f open').
Hope that helped.
Update: (31 Oct 2004)
Added link to documentation for open(). Changed from using 'gzip -dc $filename |' to 'zcat $filename |'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using zcat for input?
by thor (Priest) on Nov 01, 2004 at 02:55 UTC | |
by Anonymous Monk on Feb 28, 2017 at 16:03 UTC |