maderman has asked for the wisdom of the Perl Monks concerning the following question:
On the VMS machine, my process produces output like this:
As I understand it, cmd does not take any action UNLESS it sees the prompt (HOST$ in this case). If it doesn't see the prompt, the timeout call comes into affect. Is this correct?%WEATHERFILE-I-OPENFILE, Opening Input File: SYS$Weather_Data:20010301 +.WST %WEATHERFILE-I-OPENFILE, Opening Input File: SYS$Weather_Data:20010302 +.WST . . . etc Here is my perl code: use strict; use Net::Telnet; my $name = 'NAME'; my $passwd = 'PASSWORD'; my $telnet = Net::Telnet->new( Input_Log => "input.log", Output_Log => "output.log", Host => "HOST", Timeout => "20" ); $telnet->login(Name => $name, Password => $passwd, Prompt => '/HOST/i'); $telnet->cmd("$mycommand"); $telnet->cmd("lo"); #logout $telnet->close; exit;
In order to aviod the timeout, I could just say that I know how long it takes to process each file on the VMS machine and scale this by the number of files I want to process (and use this as the timeout value).
Is there another way of doing this?
Thanks!
Regards,
Stacy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unix - VMS and Net::Telnet
by LD2 (Curate) on Mar 28, 2001 at 08:10 UTC | |
by maderman (Beadle) on Mar 28, 2001 at 09:52 UTC | |
by maderman (Beadle) on Mar 28, 2001 at 11:02 UTC | |
by Anonymous Monk on Mar 28, 2001 at 13:09 UTC | |
|
Re: Unix - VMS and Net::Telnet
by TrinityInfinity (Scribe) on Aug 13, 2001 at 23:33 UTC |