in reply to dynamic socket communication

It's not obvious from the original post whether the value returned by the server would need to be maintained between one invocation of the client and the next.

The whole thing seems reminiscent of a web browser maintaining cookies, and cookies come in two flavours: persistent cookies: saved to disk when the browser is shut down; and session cookies: never written to disk and lost when the browser is quit.

Which flavour are we talking about here?

And furthermore, would you like a nice glass of milk with that?

use JAPH;
print JAPH::asString();