ukhas jean wrote:
> no ... its id01 and not idl01 ... sorry made a typo!!!

The suggestion to try the IP address is also a good idea.

I ran your script to localhost with a telnet daemon running on XP
and it worked fine (I used a different command than who and commented
out the improper Ctrl-C), but basically the same script.  It appears
to be failing for you on the open line (even though it's at least
line 6 in your example).  Using the IP may help if the error message
is correct.

> */Bill Luebkert <[EMAIL PROTECTED]>/* wrote:
> 
>     ukhas jean wrote:
>      > Hi all ... had a problem executing this script which tries to run a
>      > "who" command on a unix host id01.
>      >
>      > use Net::Telnet;
>      >
>      > my $host = "id01";
>      > my $port = "1800";
>      > my $t = new Net::Telnet (Timeout => 10);
>      > $t->open(Host => $host, Port => $port);
>      > $t->login("abc", "123");
>      > my @lines = $t->cmd("^C");
>      > my @lines = $t->cmd("who");
>      > print "@lines";
>      > Its giving me this error:-
>      > unknown remote host: idl01 at test.pl line 5
> 
>     Why is it saying 'idl01' instead of 'id01' ? Is $host correct ?
>     Is there something in the services file for id01 ?

I meant hosts file rather than services above.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to