Hi Monks

Sorry for asking again but am really stuck with this. I need to collect output of Perl modules installation. I am running on UNIX environment.
I am installing Perl modules (via Perl script) by using following command:
system (" perl -MCPAN -e 'install Bundle::Snapshot_2007_07_23_00' ")
The installation completed successfully.
In order to collect logs and see the output on the screen (because installation of some models is interactive) I did following changes:
system (" perl -MCPAN -e 'install Bundle::Snapshot_2007_07_23_00' | './1.pl' ")
when 1.pl is very simple:

while ($tmp = <STDIN> || $tmp = <STDERR>)
{
print $tmp;
write_to_log($tmp);
}

Now have 3 problems:
1. The interactive questions which were during installation are missing.
2. The program stuck during the modules installation.
3. The output is different from what I have before and some important parts are missing.

How I can solve those problems? Is there other way to collect Perl module installation logs?

Many thanks

In reply to How to get installtion Perl modules log? by Misha

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.