I am very new to perl, so this may seem simple to some, but my goal is to be able to reboot my linux box from a web site. The perl script works when I run it from the command line, but when I run it from a web site I get: "Premature end of script headers:". Below is my small script, does anyone have any ideas on why this won't work?
system("shutdown -g0 -r");
print "Content-type: text/html\n\n";
use CGI::Carp qw(fatalsToBrowser);