Hello, my name is Farid.
I am currently testing the Perl Telnet Object.
I meet some problems specifying my prompt parameter object.
My prompt shell looks like :

HOSTNAME<LOGNAME:~> where HOSTNAME is the name of my unix computer et LOGNAME

the user logname.

This is how i've specified my prompt in yopur object : 

Prompt => '/[a-z]*[A-Z]*<[a-z]*:~>$/'

I also tried : Prompt => '/.*>$/'

Can you help me please ????

Thank you very much for you help.

Farid.
[EMAIL PROTECTED]

Ps : here is my scripts
######################################################
#! /usr/bin/perl
# Tentative de connexion telnet sur une machine Unix

use Net::Telnet ();
$username="Farid";
$password="Farid";
$t = new Net::Telnet (Timeout => 50,
#                       Prompt => '/[A-Za-z0-9]*\<[a-z]*:\~\>$/');
#                       Prompt => '/^[^>]*>$/');
#                       Prompt => '/.*$/');
                        Prompt => '/[\% ]$/');
$t->open("192.168.10.2");
$t->login(Name => $username, Password => $password);
@lines = $t->cmd("/usr/bin/who");
print @lines;
$t->close;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to