Fellow monks,


I have run into an annoyance with a script that I am working on that is bedeviling me. Just to give you an idea of what I am up to, at the very highest functional level what the script does is as follows:

The report is being run out of cron.

Where I am running into trouble randomly is in the steps where Net::SCP::Expect is being used to gather the information from the various machines. With no rhyme or reason and for randdom hosts I get the following spew back and my script dies:

Uncaught exception from user code: Error - last line re +turned was: [the hosts's remote passord deleted from here] /usr/local +/software/perl-5.8.3/lib/site_perl/5.8.3/Expect.pm line 733 + Net::SCP::Expect::__ANON__('Expect=GLOB(0x9cd4b8)') called at / +usr/local/software/perl-5.8.3/lib/site_perl/5.8.3/Expect.pm line 733 + Expect::_multi_expect('undef','undef','ARRAY(0x9cd8b4) +') called at /usr/local/software/perl-5.8.3/lib/site_perl/5.8.3/Expec +t.pm line 536 Expect::expect('Expect=GLOB(0x9cd4b8)',' +undef','ARRAY(0x9cd6ec)','ARRAY(0x9cd704)','ARRAY(0x9cd740)') called +at /usr/local/software/perl-5.8.3/lib/site_perl/5.8.3/Net/SCP/Expect. +pm line 225 Net::SCP::Expect::scp('Net::SCP::Expect=HA +SH(0x9cd224)','root@xeng-wiz.msnyuhealth.org:/var/adm/messages','/tmp +/messages') called at RemFile.pm line 170 RemFile::ope +nForRead('RemFile=HASH(0x9cd194)') called at ./make2745Report.pl line + 214 main::loadFiles('HASH(0x7e150c)') called at ./mak +e2745Report.pl line 184 main::createReport('HASH(0x7e1 +50c)') called at ./make2745Report.pl line 84
When I run the report manually from an interactive terminal session it never breaks.

Has anybody elee run into this? Like I said above it does not happen every time, just when I'm not near my computer so I can run the report manually. Very annoying.

Obligatory platform/Perl version information:

$ uname -a SunOS foo 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-250 $ perl -v This is perl, v5.8.3 built for sun4-solaris Copyright 1987-2003, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge.
The version of {cpan://Net::SCP::Expect] is whatever the latest version on CPAN is. I just ran an update to make damn sure.


In reply to Net::SCP::Expect annoyance. by blue_cowdawg

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.