in reply to Accessing perl script through browser
See CGI and/or Plack or Mojolicious.
Also see the CGI Programming section in Tutorials.