[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    telnet.pm
From:       "Mundell, R. \(Ronald\)" <RonaldMu () nedcor ! com>
Date:       2003-06-26 10:04:57
[Download RAW message or body]

Good day All

I am trying to use the telnet module and experiance some strange error. I
login correctly, but when I use the $t->cmd("who") function, it does not
return anything. If anyone knows what I do wrong please help

    my $t = new Net::Telnet( Timeout => 30, Prompt => '/[\w:\w:\w]/',
Telnetmode => 0);
    print qq|Open $Server\n|;
    $t->open ( qq|$Server.it.nednet.co.za| ) or next; #warn ("Warning:
$!\n");
    print qq|Login $Server\n|;
    $t->login ( $username, $password );
    print qq|Done Login $Server\n|;
    my @list = $t->cmd ( "who" );
    print @list;

Ronald Mundell
 


********************
This email and any accompanying attachments may contain confidential and proprietary \
information.  This information is private and protected by law and, accordingly, if \
you are not the intended recipient, you are requested to delete this entire \
communication immediately and are notified that any disclosure, copying or \
distribution of or taking any action based on this information is prohibited.

Emails cannot be guaranteed to be secure or free of errors or viruses.  The sender \
does not accept any liability or responsibility for any interception, corruption, \
destruction, loss, late arrival or incompleteness of or tampering or interference \
with any of the information contained in this email or for its incorrect delivery or \
non-delivery for whatsoever reason or for its effect on any electronic device of the \
recipient.

If verification of this email or any attachment is required, please request a \
                hard-copy version.
********************


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>telnet.pm</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">Good day All</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am trying to use the telnet module and experiance some \
strange error. I login correctly, but when I use the $t-&gt;cmd(&quot;who&quot;) \
function, it does not return anything. If anyone knows what I do wrong please \
help</FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; my $t = new Net::Telnet( Timeout \
=&gt; 30, Prompt =&gt; '/[\w:\w:\w]/', Telnetmode =&gt; 0);</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp; print qq|Open $Server\n|;</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp; $t-&gt;open ( qq|$Server.it.nednet.co.za| ) or next; \
#warn (&quot;Warning: $!\n&quot;);</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp; print qq|Login $Server\n|;</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp; $t-&gt;login ( $username, $password );</FONT> \
<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; print qq|Done Login \
$Server\n|;</FONT> <BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; my @list = \
$t-&gt;cmd ( &quot;who&quot; );</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp; print @list;</FONT> </P>

<P><FONT FACE="Arial">Ronald Mundell</FONT>
<BR><FONT FACE="Arial"> </FONT>
</P>


<P><FONT face=Arial size=2>
<HR>
</FONT></P>
<P></P><SPAN lang=EN-ZA 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-family: 'Times New \
Roman'">This  email and any accompanying attachments may contain confidential and \
proprietary  information.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>This \
information is  private and protected by law and, accordingly, if you are not the \
intended  recipient, you are requested to delete this entire communication \
immediately and  are notified that any disclosure, copying or distribution of or \
taking any  action based on this information is prohibited.</SPAN> 
<P class=MsoNormal><SPAN lang=EN-ZA 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-family: 'Times New \
Roman'"></SPAN><SPAN  lang=EN-ZA 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-family: 'Times New \
Roman'">Emails  cannot be guaranteed to be secure or free of errors or viruses.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>The sender does not accept any liability 
or responsibility for any interception, corruption, destruction, loss, late 
arrival or incompleteness of or tampering or interference with any of the 
information contained in this email or for its incorrect delivery or 
non-delivery for whatsoever reason or for its effect on any electronic device of 
the recipient.<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-ZA 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-family: 'Times New \
Roman'">If  verification of this email or any attachment is required, please request \
a  hard-copy version.</SPAN></P>
<HR class=MsoNormal>

<P></P>
</BODY>
</HTML>


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic