good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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 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)[2]/6]," fellow monks."
In reply to Re^5: help me on socket programming
by Utilitarian
|
|