in reply to Socket connection with Perl (server side) and HTML web page.

Socket? Do you mean a websocket? See Connecting OBS to my home automation network on how to write a Perl client.

As for HTML: Browsers only allow Javascript. See Javascript Websocket

Well, technically, you could fiddle with something like emscripten to cross-compile any C program (inkluding Perl) to Javascript. That's a MAJOR undertaking but it's technically possible. That is how the people at archive.org have cross-compiled the DOSBox emulator so that you can play old DOS games on their website. You still wouldn't be able to use raw network sockets.

I've done a fair bit with Websockets, see BaseWebSocket.pm and it's corresponding HTML template basewebsocket.tt. All this is pretty tied to my own framework, but if you need any help doing something similar in yours, feel free to ask.

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
  • Comment on Re: Socket connection with Perl (server side) and HTML web page.