blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:

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.