Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Am I missing something major here (system/exec)?

by izut (Chaplain)
on May 23, 2006 at 16:08 UTC ( [id://551188]=note: print w/replies, xml ) Need Help??


in reply to Am I missing something major here (system/exec)?

You must print the HTTP headers!

use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); my $program = "C:\full\path\to\index.bat"; # unless it's in the same d +irectory. print "Content-type: text/html\n\n"; # this is the header the browser +expects. system $program == 0 or die "$program exited funny: $!";

Update: Updated comments.

Update: Updated system usage, as japhy said.

Update: As ww pointed, you have to return something to browser, even a simple html document saying everything's ok, or a simple redirect to another web page. If you don't, the browser will always complain about that.

Igor 'izut' Sutton
your code, your rules.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://551188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-24 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found