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

net::telnet and read eof error

Thread Next
From:
Craig Williams
Date:
March 13, 2002 10:37
Subject:
net::telnet and read eof error
Message ID:
E94E9A31F8EDD311BA4B00508B6493BB5245BE@epsnt1.epshq.eps.rwk.com
In my first attempt at telneting into sun box from win98, i've been
receiving the error message : pattern match read eof at scriptName.pl 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
ideas?

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

#!perl -w

    my ($forecast, $t);

    use Net::Telnet ();
    $t = new Net::Telnet;
    $t->open("rainmaker.wunderground.com");

    ## Wait for first prompt and "hit return".
    $t->waitfor('/continue:.*$/');
    $t->print("");

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

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

    exit;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About