Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Problem with net::telnet

by joyeux (Initiate)
on Dec 06, 2012 at 05:30 UTC ( #1007472=perlquestion: print w/ replies, xml ) Need Help??
joyeux has asked for the wisdom of the Perl Monks concerning the following question:

This is my code

use Net::Telnet $t=new Net::Telnet(Timeout =>100, Prompt => '/[\$?>:#\]]*$/'); if($t->open('192.168.1.200')) { print "connected"; } else { print "not connected"; } # if i give wrong user name and password also it didnt<br/> show #error msg $t->login('test','test123'); @lines=$t->cmd("ls"); # always prints 1 $t->close;
could plz someone help me

Comment on Problem with net::telnet
Download Code
Re: Problem with net::telnet
by 2teez (Priest) on Dec 06, 2012 at 05:39 UTC

    Please, could you insert your codes within the tag <code>.You could also see this How do I post a question effectively?
    === UPDATE ===
    Please, if I may suggest that you always use strict and warnings in your scripts.
    Moreover, you can check EXAMPLE of this module usage in the Example section of the module.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1007472]
Approved by rovf
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-11-29 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls