http://qs321.pair.com?node_id=642672

downer has asked for the wisdom of the Perl Monks concerning the following question:

I am using the Server Mode of the Rainbow Text Classifier. The classifier is fully trained, and is listening to a port (1821) on a server in my lab. The interface through telnet looks like this:
Trying 128.*******.12... Connected to rhino.***.edu. Escape character is '^]'.

i can then input whatever text I want, followed by a newline, a '.' and another newline (all input has to end with "\r\n.\r\n" and it sends back the results of the classification to my terminal. I'd like to automate this, but as this is my first time doing any kind of remote computing, I'm clueless. I've tried the following just to see what, if anything the server is sending me, but it only sends back '1'
use Net::Telnet (); $hostname = "rhino.****.edu"; $pop = new Net::Telnet (Telnetmode => 0); $pop->open(Host => $hostname, Port => 1827); $x = "Kingdom Hearts is a series of action role-playing games develope +d and publ ished by Square Enix (formerly Square). It is the resu +lt of a collaboration betw een Square and Disney Interactive Stud +ios, and is under the direction of Tetsuya Nomura"; $x .= "\r\n.\r\n"; $pop->print($x); $f = $pop->waitfor('//'); print "$f\n";

stupid code, to be sure, i'd just like to know the server is sending me something. I can't check even this. I beg the perl monks for wisdom. please advise me!