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