The status information comes out via stderr, so you'll need to redirect that in order to capture it.

Try:

open PIPE, '-|', '"\Program Files\7-Zip\7z.exe" a -r -mx0 -tzip e:\the +Zip.zip 2>&1' or die $@;; while( <PIPE> ) { # do something with the status output here }

Update: Here's the test I ran of my suggestion:

Perl> open PIPE, '-|', '"\Program Files\7-Zip\7z.exe" e -so e:\UnxUtil +sSrc.zip 2>&1 1>nul' or die $@;; Perl> print <PIPE>;; 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Processing archive: e:\UnxUtilsSrc.zip Extracting unxutils Extracting unxutils\CVS Extracting unxutils\CVS\Root Extracting unxutils\CVS\Repository Extracting unxutils\CVS\Entries Extracting unxutils\Downhill Extracting unxutils\Downhill\CVS Extracting unxutils\Downhill\CVS\Root Extracting unxutils\Downhill\CVS\Repository Extracting unxutils\Downhill\CVS\Entries Extracting unxutils\Downhill\DOC Extracting unxutils\Downhill\DOC\CVS Extracting unxutils\Downhill\DOC\CVS\Root Extracting unxutils\Downhill\DOC\CVS\Repository ... Extracting unxutils\zsh\Src\zle_utils.c Extracting unxutils\zsh\Src\zle_utils.pro Extracting unxutils\zsh\Src\zle_vi.c Extracting unxutils\zsh\Src\zle_vi.pro Extracting unxutils\zsh\Src\zle_word.c Extracting unxutils\zsh\Src\zle_word.pro Extracting unxutils\zsh\Src\zsh.exe Extracting unxutils\zsh\Src\zsh.h Extracting unxutils\zsh\Src\zsh.map Extracting unxutils\zsh\Src\ztype.h Extracting unxutils\zsh\Src\_exrc Everything is Ok Folders: 640 Files: 10528 Size: 108861113 Compressed: 38592955

I used -so & >nul to avoid the files actually being created, but omit those and they will.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: Perl and 7zip and backticks by BrowserUk
in thread Perl and 7zip and backticks by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.