in reply to how to properly handle the closing of pipe? read from the pipe unzip-c and get out before
You have a perl program that needs to extract some information from the beginning of a file in a .zip. As this script is on a production system, you cannot install additional modules that might make this easier. The script as written passes perlcritic, but dies on the croak line for the pipe close. Removing the croak statement (obviously) makes the error disappear, but then it won't pass perlcritic. You believe that the code as written results in a memory leak of some sort, apparent when a large (>10GB) is being unzipped. Does this sound correct?
Given your source (thank you for formatting it properly), I have a couple of general comments:
fnord
|
|---|