in reply to Dear Monks, again socket (wbsocket server side)
You can't just put your Perl code inside of HTML and expect it to run.
As a start, read all of the linked information at CGI Programming.