On 6/12/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote:
But it did not work. I was getting the below error:
        "timed-out waiting for command prompt at <file name> line <line number>"
snip

This code works for me.

#!/usr/bin/perl

use strict;
use warnings;

use Net::Telnet;

#my propmt is /home/user>
my $prompt = '>$';

my $t = Net::Telnet->new(
       Timeout => 10,
       Prompt  => "/$prompt/"
);

$t->open("widomaker.com");
$t->login("user", "pass");
my @lines = $t->cmd("who");
print @lines;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to