Net-Appliance-Session - Re: Retriving the prompt

Posted on Thu Jan 17 00:41:52 2008 by oliver in response to 6885 (See the whole thread of 5)
Re: Retriving the prompt
Hi Miky
You should be able to use lastprompt on the Net::Appliance::Session object itself.

Both Net::Telnet::Cisco and my module Net::Appliance::Session are derived from Net::Telnet. The last_prompt, lastline and other similar methods are from Net::Telnet so are automatically inherited by objects in the Net::Appliance::Session class. e.g.:

my $s = Net::Appliance::Session->new('hostname.example'); $s->connect(Name => 'username', Password => 'loginpass'); ...etc... $s->cmd('show access-list'); print $s->last_prompt;

Please see the Net::Telnet manual page for further details. I hope that helps :-)

regards,
oliver.
Direct Responses: 6888 | Write a response