<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1000992" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1000992</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/show-contents-text-file#comment-1004196</link>
    <description> &lt;p&gt;Aha! Thanks a lot! I got it to work now...&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;The fireburn.com Network:&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;LI&gt; &lt;a href=&quot;http://www.fireburn.com&quot; class=&quot;bb-url&quot;&gt;fireburn.com&lt;/a&gt; &lt;em&gt;[www.fireburn.com]&lt;/em&gt;&lt;br /&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.flamehosting.com&quot; class=&quot;bb-url&quot;&gt;Flame Hosting&lt;/a&gt; &lt;em&gt;[www.flamehosting.com]&lt;/em&gt;&lt;br /&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.ineffabledesigns.com&quot; class=&quot;bb-url&quot;&gt;Ineffable Designs&lt;/a&gt; &lt;em&gt;[www.ineffabledesigns.com]&lt;/em&gt;&lt;br /&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.webmasters-portal.com&quot; class=&quot;bb-url&quot;&gt;The Webmasters Portal&lt;/a&gt; &lt;em&gt;[www.webmasters-portal.com]&lt;/em&gt;&lt;/li&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 28 Feb 2000 02:48:00 +0000</pubDate>
 <dc:creator>Justin S</dc:creator>
 <guid isPermaLink="false">comment 1004196 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/show-contents-text-file#comment-1004195</link>
    <description> &lt;p&gt;Heh, I see the problem.  From the &lt;em&gt;perldata&lt;/em&gt; documentation:&lt;/p&gt;
&lt;p&gt;Because variable and array references always start with &#039;$&#039;, &#039;@&#039;, or &#039;%&#039;, the &quot;reserved&quot; words aren&#039;t in fact reserved with respect to variable names.  (They ARE reserved with respect to labels and filehandles, however, which don&#039;t have an initial special character.  &lt;strong&gt;You can&#039;t have a filehandle named &quot;log&quot;, for instance.&lt;/strong&gt;  Hint: you could say open(LOG,&#039;logfile&#039;) rather than open(log,&#039;logfile&#039;).  Using uppercase filehandles also improves readability and protects you from conflict with future reserved words.)&lt;/p&gt;
&lt;p&gt;The section in bold is the most relevant.  It is considered good Perl style to use words in all capital letters for filehandles.  Your problem is the fact that &quot;log&quot; is the name of a function in Perl.  Try using &quot;LOG&quot;.&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
--&lt;br /&gt;
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve&lt;/p&gt;
 </description>
     <pubDate>Mon, 28 Feb 2000 00:26:00 +0000</pubDate>
 <dc:creator>japhy</dc:creator>
 <guid isPermaLink="false">comment 1004195 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/show-contents-text-file#comment-1004194</link>
    <description> &lt;p&gt;Ok, I think that&#039;s what I want, but it&#039;s giving me a 500 Internal Server Error. Here is the code:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;#!/usr/bin/perl

########################################################
## Counter                                            ##
## &lt;a href=&quot;http://www.fireburn.com&quot; class=&quot;bb-url&quot;&gt;www.fireburn.com&lt;/a&gt;                                    ##
########################################################

########################################################
## Variables                                          ##
########################################################

## Path to the counter file
$countfile = &quot;/home/fireburn/public_html/cgi-bin/count/count.dat&quot;;

## Path to the log file
$logfile = &quot;/home/fireburn/public_html/cgi-bin/count/log.dat&quot;;

########################################################
## Code                                               ##
########################################################

open(log,&quot;&amp;lt;$logfile&quot;);
@data = &amp;lt;log&amp;gt;;
close(log);

print &quot;Content-type:text/html\n\n&quot;;
print @data;[/code]

All the other files work right and are doing there job except this one... I know I chmoded it right also.

------------------
&lt;strong&gt;&lt;em&gt;The fireburn.com Network:&lt;/em&gt;&lt;/strong&gt;
&lt;LI&gt; &lt;a href=&quot;http://www.fireburn.com&quot; class=&quot;bb-url&quot;&gt;fireburn.com&lt;/a&gt; &lt;em&gt;[www.fireburn.com]&lt;/em&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.flamehosting.com&quot; class=&quot;bb-url&quot;&gt;Flame Hosting&lt;/a&gt; &lt;em&gt;[www.flamehosting.com]&lt;/em&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.ineffabledesigns.com&quot; class=&quot;bb-url&quot;&gt;Ineffable Designs&lt;/a&gt; &lt;em&gt;[www.ineffabledesigns.com]&lt;/em&gt;
&lt;/li&gt;&lt;LI&gt; &lt;a href=&quot;http://www.webmasters-portal.com&quot; class=&quot;bb-url&quot;&gt;The Webmasters Portal&lt;/a&gt; &lt;em&gt;[www.webmasters-portal.com]&lt;/em&gt; &lt;/li&gt;&lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Sun, 27 Feb 2000 23:05:00 +0000</pubDate>
 <dc:creator>Justin S</dc:creator>
 <guid isPermaLink="false">comment 1004194 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/show-contents-text-file#comment-1004193</link>
    <description> &lt;p&gt;let me add on to that  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;br /&gt;
if you want to replace every \n (standerd UNIX line break) with a &amp;lt;br&amp;gt; tag use a regular expression&lt;/p&gt;
&lt;p&gt;open(file,&quot;file.txt&quot;);&lt;br /&gt;
local($/);&lt;br /&gt;
$file = &amp;lt;file&amp;gt;;&lt;br /&gt;
close(file);&lt;/p&gt;
&lt;p&gt;$file =~ s/\n/&amp;lt;br&amp;gt;/;&lt;br /&gt;
print $file;&lt;/p&gt;
&lt;p&gt;hope that helps&lt;/p&gt;
 </description>
     <pubDate>Sun, 27 Feb 2000 19:01:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1004193 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/show-contents-text-file#comment-1004192</link>
    <description> &lt;p&gt;Try somthing like:&lt;/p&gt;
&lt;p&gt;open(IN,&quot;&amp;lt;file.txt&quot;);&lt;br /&gt;
@data = &amp;lt;IN&amp;gt;;&lt;br /&gt;
close(IN);&lt;/p&gt;
&lt;p&gt;print &quot;Content-type:text/html\n\n&quot;;&lt;br /&gt;
print @data;&lt;/p&gt;
&lt;p&gt;This would open file.txt, put each line as an element in an @array and than print the @array.&lt;/p&gt;
&lt;p&gt;Is that what you needed or no?&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;strong&gt;Windmills always turn counter-clockwise. Except for the windmills in Ireland.&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 27 Feb 2000 15:33:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1004192 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
