<?xml version="1.0" encoding="windows-1252"?>
<node id="51717" title="Re: use CGI or die;" created="2001-01-14 07:38:23" updated="2005-08-15 09:55:07">
<type id="11">
note</type>
<author id="43868">
epoptai</author>
<data>
<field name="doctext">
I always use strict, -w and fatalsToBrowser when developing, 
but today this caused me a huge headache in 
a simple script (with no syntax errors) that merely reads a 
file, formats the contents, and displays the html.
&lt;p&gt;It runs 
fine from the command line (with a few uninitialized value 
warnings) and could save the output with &lt;code&gt;
perl foo.pl &gt; foo.html&lt;/code&gt;
but it would just whirl and give no output via CGI. I found that 
the code looks and behaves perfectly via CGI unless 
&lt;i&gt;both&lt;/i&gt; -w and fatalsToBrowser are enabled! Shut 
either one off (leaving the other on) and it works fine.
&lt;p&gt;
I found a certain loop in the program that seems to cause 
this by throwing pairs of =cut around, but the loop seems 
mundane and similar to the others.
&lt;p&gt;
Is this odd interplay between -w and fatalsToBrowser documented?
&lt;p&gt;&lt;blockquote&gt;
&lt;b&gt;Update:&lt;/b&gt; I said i'd node the entire script to craft 
in a day or two but am finding it difficult to abstract a 
simplified example. So i'll just suggest that if your 
error-free cgi script mysteriously hangs, turning off 
either -w or fatalsToBrowser may help.
&lt;p&gt;
[dws] - Try this for a good html &amp;#153;:
&lt;code&gt;
&amp;#153;
&lt;/code&gt;
&lt;/blockquote&gt;
</field>
<field name="root_node">
51012</field>
<field name="parent_node">
51225</field>
</data>
</node>
