From: ukhas jean [mailto:[EMAIL PROTECTED] 
Sent: 28 August 2006 05:55
To: Brian Raven; Active Perl
Subject: RE: query on net::telnet module

> Hello Brian et al ...
>  
> I rewrote the code to this :-
>  
> use strict;
> use warnings;
> use Net::Telnet ();
> my $t = new Net::Telnet (Timeout => 30);
>                           #Prompt => '/bash\$ $/');
>                           
> my $username = "jenson";
> my $passwd = "abc";
>     $t->open("viewserver");
>     #$t->login($username, $passwd);
>     
>     $t->login(Name => $username, 
>            Password => $passwd);
>     
>    my @lines = $t->cmd("who");
>     #print @lines;
>     
>     my $aa = $t -> dump_log;
>     print $aa;
>     #input_log();
> 
> I tried using dump_log and input_log as described in the documentation
...

Not really, no. In order to output something, you need to provide a
filehandle or filename, as described in the documentation. Also it would
be more use if you called input_log before open, or perhaps used the
Input_log parameter to the constructor instead.

>  
> But it still doesnt work ... 

That is far to vague a problem description to be of any use. Fortunately
in this case I can make a guess that has a good chance of being
somewhere near the mark, but in general it is better to be explicit
about what you did, what happened, and how that differed from what you
expected. See http://www.catb.org/%7Eesr/faqs/smart-questions.html for
more useful information.

>  
> PS:: when i manually login to my server ... it gives me a list of
oracle versions to choose from ... I have to > do a ctrl-C to goto the
korn shell ....
> Would this be a problem for my script???

Well, that is different, and will certainly be a problem for your script
as written. You will see from the description of what login does that it
is unlikely to be successful in the case you describe. That
documentation also suggests what to do instead.

Lastly, can I ask if you have really read the documentation as it
contains most of your answers? No offence intended, but your posts seem
to suggest that you have either not read it, or you have not taken much
notice of what it said. If however you are having problems understanding
the documentation, and there is certainly nothing wrong with that - it
isn't perfect, then you may get further by asking specific questions
about those parts of the documentation that you don't understand. Not
only does that help the questioner, but it can sometimes lead to
improvements in the documentation.

HTH

-- 
Brian Raven 



=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to