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

Hi Monks Just a small question
use Net::Telnet (); my $telnet = TelnetLogin($ip_address,$name, $passwd, $os_type); $out=$telnet->cmd("xxx");
What is the default timeout value for the command xxx in above case?

Replies are listed 'Best First'.
Re: What is the default timeout value for commands used in telnet
by Krambambuli (Curate) on Apr 12, 2007 at 09:24 UTC
    As I read the doc, there is one 'overall' default timeout value (that is set to 10 seconds) which you can get/set via the timeout() method like
    $secs = $telnet->timeout; $prev = $telnet->timeout($secs);
    Also, you might finetune your way of operation by changing the timeout for a specific command, like
    $ok = $obj->cmd( String => "xxx", Timeout => $secs, );
Re: What is the default timeout value for commands used in telnet
by marto (Cardinal) on Apr 12, 2007 at 09:03 UTC
    Did you read the documentation?

    "The default Timeout is 10

    Update: Sorry, Lack of sleep and lack of caffeine often result in complete nonsense

    Martin
      marto, I would also say, according to the documentation, that the default is 10sec, what made you think it isn't ?

      LuCa
        I seem to be experiencing mental issues caused by lack of sleep / lack of caffeine / too much work :)
Re: What is the default timeout value for commands used in telnet
by logie17 (Friar) on Apr 12, 2007 at 15:28 UTC
    According to the CPAN documentation, the default timeout is 10. Check this out.

    Thanks!
    s;;5776?12321=10609$d=9409:12100$xx;;s;(\d*);push @_,$1;eg;map{print chr(sqrt($_))."\n"} @_;