Benahimvp has asked for the wisdom of the Perl Monks concerning the following question:
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.#!/usr/bin/perl use CGI; require "../common.sub"; use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; print "Hello World";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Don't want to have to use -w
by DamnDirtyApe (Curate) on Jul 17, 2002 at 18:38 UTC | |
Re: Don't want to have to use -w
by DamnDirtyApe (Curate) on Jul 17, 2002 at 18:32 UTC | |
Re: Don't want to have to use -w
by BrowserUk (Patriarch) on Jul 17, 2002 at 20:34 UTC | |
Re: Don't want to have to use -w
by gav^ (Curate) on Jul 17, 2002 at 19:47 UTC | |
Re: Don't want to have to use -w
by Benahimvp (Initiate) on Jul 17, 2002 at 22:05 UTC |