I whant to execute in my cgi (.pl) a procedure that will generate a HTML page. This HTML page contains a perlscript. When I call the subroutine, the HTML page is generated, but the perlscript will not work.

Besides the routine that the perlscript in the HTML page has to do, it should not be visible in the HTML code when viewing the source.

My question is how do execute properly this perlscript in my cgi and if posible, how to use it without generating the HTML page.

My goal is to use session variables to send information to another page in another server without using the get or post methods.

It's sensible data so I need to work on a script that allows me to procees the information that is sent to me and then, send it to another server (remote server, not in my installations).

PerlScript is meant to be used in lieu of the VBScript commonly used for active server pages.

What I think you need to do is create the page with a .asp extension and run it on an IIS server or a unix box running the ChiliSoft Active Server Page Server (not sure if it is a full blown server or just an add in to a server. Always ran my ASP through IIS). The page should contain everything in your print statement and the action tag of the preceding form should be the name of this new .asp file.