<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043321" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043321</link>
    <description></description>
    <language>en</language>
          <item>
    <title>It should work - It works in</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/perl-help#comment-1239409</link>
    <description> &lt;p&gt;It should work - It works in my test environment.&lt;/p&gt;
&lt;p&gt;Do you have permissions set right on &#039;comments.txt&#039;?  It will need to be writable by the user running the webserver.&lt;/p&gt;
&lt;p&gt;Since you&#039;re only appending (&#039;&amp;gt;&amp;gt;&#039;), comments.txt is created, right? (touch comments.txt and change permissions if required)&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy.&lt;/p&gt;
 </description>
     <pubDate>Mon, 16 Mar 2009 20:17:46 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1239409 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi, welcome to TWF 
I&#039;m not</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/perl-help#comment-1239405</link>
    <description> &lt;p&gt;Hi, welcome to TWF &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I&#039;m not familiar with perl, so some of the above means nothing to me and someone who knows perl might see an error in your code.&lt;/p&gt;
&lt;p&gt;However, I can suggest you echo out the &lt;code&gt;$comments&lt;/code&gt; var throughout your script. Right after you use the &lt;code&gt;$comments&lt;/code&gt;, echo it out to see if it still contains the data it should.&lt;br /&gt;
I find this works very well for finding where an issue occurs so I can then investigate that part of the code.&lt;/p&gt;
&lt;p&gt;Try using your function to write some simple text to the file, not using your vars, just write &quot;test text&quot; and see if that works.&lt;br /&gt;
If yes then there is something wrong with your var data in that function (perhaps global vars like in PHP?), if it doesn&#039;t work then there is something else wrong with the function, the file opening, permissions, file writing etc.&lt;/p&gt;
&lt;p&gt;As for the blank page:&lt;br /&gt;
I presume it&#039;s opening the file ok, as you have a &#039;die&#039; clause and you didn&#039;t state it outputs an error.&lt;br /&gt;
So, try using your function to write some simple text to the page (as with the suggestion for the comments.txt file)&lt;/p&gt;
&lt;p&gt;Again I don&#039;t know perl, but...&lt;br /&gt;
From a quick look on the net, I find this:&lt;br /&gt;
&lt;code&gt;open (OUTFILE, &amp;quot;&amp;gt;&amp;gt;file.txt&amp;quot;)&lt;/code&gt;&lt;br /&gt;
where you have:&lt;br /&gt;
&lt;code&gt;open(OUTFILE, &amp;quot;&amp;gt;&amp;gt;&amp;quot;, &amp;quot;comments.txt&amp;quot;)&lt;/code&gt;&lt;br /&gt;
I.E. you close the &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;quot;,&lt;/code&gt;.&lt;br /&gt;
But perhaps your method is also ok.&lt;/p&gt;
 </description>
     <pubDate>Mon, 16 Mar 2009 16:23:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1239405 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
