sans-clue has asked for the wisdom of the Perl Monks concerning the following question:
but I found I need to print/type something out every 60 seconds $t->print('HELLO'); Since this while loop waits for output, it can be idle for a long time so I can't issue the 'HELLO' on a timely basis. Any ideas how I could do this ? I can't timeout and reconnect, because it will cause the device grief. I need to wait for input yet issue 'HELLO' every 60 secs... thanksuse Net::Telnet; my $t = Net::Telnet->new( Time => 99999999, Port => 23 ); $t->open(1.2.3.4); while (my $output = $t->getline()) { print $output; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: While loop - telnet module question
by gmargo (Hermit) on Nov 04, 2009 at 22:52 UTC |