develooper Front page | perl.beginners | Postings from March 2002

net::telnet and read eof error

Thread Next
Craig Williams
March 13, 2002 10:37
net::telnet and read eof error
Message ID:
In my first attempt at telneting into sun box from win98, i've been
receiving the error message : pattern match read eof at line
xx    ------   where xx is the login line. Unable to resolve that error
through the usual methods I tried executing the rainmaker sample in the
documentation at the end of the net::telnet module and received the same
error (this time at the "$t->waitfor('/continue:*$/);) line. I'm guessing
it's a setup error on my machine but haven't a clue where to look.  Any

(sample from the net::telnet documentation that i ran)

#!perl -w

    my ($forecast, $t);

    use Net::Telnet ();
    $t = new Net::Telnet;

    ## Wait for first prompt and "hit return".

    ## Wait for second prompt and respond with city code.
    $t->waitfor('/city code.*$/');

    ## Read and print the first page of forecast.
    ($forecast) = $t->waitfor('/[ \t]+press return to continue/i');
    print $forecast;


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About