I'm a newbie to this site and I wasn't sure whether to post this in this category or debuggin. I'm running Perl 5.6 on a Linux box running Apache. So I created this test script:
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
print "Hello World";
and it wouldn't work on the web. I checked the server error logs and it said something about premature end of script. However when I ran it from the command line, it worked just fine. I searched the Perl forum cuz I knew something like this was probably common. I found out that if I put the "-w" option with the shebang line, it works fine on the web. So I have two questions. Why is that? And what do I need to do so that I don't have to use -w? You see I'm moving my site from a Win NT computer to a Linux cluster. I never had to use the -w on the Windows computer, but now I do. I thought Perl on Windows is the same as Perl on Linux. I don't want to have to go back through all my scripts and add in -w just so it would work. So how can I make it work without "-w"? I've asked this question and two other forums and people still haven't been able to figure out why this happens. Thanks for your help.