Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exiting a Perl CGI Script and exiting properly

    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?

  • #2
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>
    window.close()
    </script>!;

  • #3
    New Coder
    Join Date
    Mar 2009
    Location
    Fabric Covered Box
    Posts
    69
    Thanks
    1
    Thanked 16 Times in 14 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •