There does not appear to be a stream of data to read coming from that port when you connected, usually you have to send a request in these circumstances and the response is then sent and the socket is closed by the remote host or an agreed end of data signal flag is sent (usually "OK" or ("NO"|"KO")) to indicate the end of the data stream.
in reply to Re^4: help me on socket programming
in thread help me on socket programming
In this case you should perhaps print your request to the socket and process the data stream until end of data or end of response token.
print "Good ",qw(night morning afternoon evening)[(localtime)/6]," fellow monks."