Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
EDIT: Not sure what I was thinking, Monday morning I guess. I just replaced the \n chars with something else, searched for that after the transmission, then replaced them with \n's again afterward. It works great.
Ikegami, thanks again for the response. I've been trying to decode this, and I think it mostly makes sense to me, but I need to be able to send multi-line messages (ie \n chars embedded) and want to terminate the sending connection with a specific character string. In other words, I'll have a datagram that looks something like this: &&&hostname|blue*** (the start/end chars can be anything) &&&ipaddress|1.2.3.4*** &&&kernelrev|123456-78*** &&&metastat|line1\nline2\nline3\n*** So I basically will be sending all types of data, but I want it to start paying attention when &&& is read, and read until ***, storing the contents in a var. (Probably will end up using a hash, if it matters) I thought I had a good grip on how exactly that code works, but when I change what I thought I should change, it doesn't work as I expected. Any thoughts to send me in the right direction? Much appreciated!
/\ Sierpinski
In reply to Re^4: Can a socket listen for multiple hosts?
by sierpinski
|
|