http://www.perlmonks.org?node_id=965260


in reply to (OT) how to call cgi script from javascript?

Look into CGI::Ajax.  There are several examples in the docs.