You are right, of course. I never use anything but $!, so I had forgotten this. The OP error output seemed to indicate that $ERRNO was blank. I was unsure as to why, or whether he simply omitted it. At any rate, it looks like his problem was fixed by changing the params to unzipfnord | [reply] |
unzip fixed - yes,but error after the close of the pipe is still
$ perl pipe_quest.pl
unable to close: unzip -p test.zip utp.live.stp.published.messages.txt at pipe_quest.pl line 29
| [reply] |
Another check of the unzip man page yields the likely reason for your problem. Closing a pipe causes the writer (unzip in this case) to receive SIGPIPE. unzip subsequently returns a non-zero exit status (sets $? to SIGPIPE, or 13), which may be causing croak to fire. You may want to change you logic to not croak if the close fails, but $? is set to 13fnord
| [reply] |