View Full Version : Exiting a Perl CGI Script and exiting properly

05-18-2009, 01:56 AM
I am setting up a CGI Script coded in perl to log into a db and update some records.

I need to execute this from another server from a batch file under a specific situation. I created the batch file with 1 line....
START http://server1:900/cgi-bin/CPO_EnvDown_SIT.cgi

This opens up a window, executes the script, but it leeaves the browser open.
How can I close the browser window?

Or is there another way I should execute it?

05-18-2009, 03:20 AM
I found that if I put this at the end of the script it works.......with 1 more issue. I get the message: The webpage you are viewing is tring to close....

How do I get round this?

print qq!<script>

Shannon Blonk
05-18-2009, 05:17 AM
Just whip up a quick perl script to fetch the page with LWP, and run the perl script from your batchfile.

Or if server 2 doesn't have perl ( START looks like windoze), use wget.