http://qs1969.pair.com?node_id=509482

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

I am getting timed-out waiting for command prompt at C:\InstallV3\Test.pl line 5. Any Clue why ? thanks
use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>35,Prompt => '/ksh\$ $/'); $telnet->open('sunspot'); $telnet->login('snuppy', 'snuppy_dog'); @lines = $telnet->cmd('who'); print @lines; $telnet->close;

Replies are listed 'Best First'.
Re: use Net::Telnet timed-out waiting for command prompt
by blue_cowdawg (Monsignor) on Nov 17, 2005 at 17:34 UTC
        I am getting timed-out waiting for command prompt

    Try using the logging features of Net::Telnet and see what the conversation looks like. Most likely what is being expected as a prompt is not being seen by the module.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      Thank You it was prompt that has not been recognized
Re: use Net::Telnet timed-out waiting for command prompt
by Anonymous Monk on Nov 17, 2005 at 17:41 UTC
    Almost certainly your prompt value - try taking it out (the default should work).