<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1001177" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1001177</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-i-print-specific-part-file#comment-1005130</link>
    <description> &lt;p&gt;Say you have a file containing&lt;br /&gt;
Where&lt;br /&gt;
were&lt;br /&gt;
you&lt;br /&gt;
night?&lt;/p&gt;
&lt;p&gt;You want to add &#039;last&#039; before night.  if the file was currently in an @array, than night would be the third element.  So, to make &#039;last&#039; the third element, and night the fourth (and if there was another element after night, it would become the fifth etc), try using:&lt;br /&gt;
&lt;BLOCKQUOTE&gt;code:&lt;/blockquote&gt;&lt;/p&gt;
&lt;pre&gt;
$num  = 3; #remembere to take away 1 because it starts at 0 not 1
$file = &#039;text.txt&#039;;
$addition = &quot;last\n&quot;; #remember the newline \n

#Opening file and getting input
open(IN,$file) or die &quot;Cannot open $file to read: $!&quot;;
@data = &amp;lt;IN&amp;gt;;	
close(IN);

#adding new element
splice(@data,$num,0,$addition);

#printing back into file
open(IN,&amp;gt;$file) or die &quot;Cannot open $file to write: $!&quot;;
print IN @data;
close(IN);
[/code]

Hope that helps a little.

------------------
&lt;a href=&quot;http://www.thehungersite.com&quot; class=&quot;bb-url&quot;&gt;click here to help save lives&lt;/a&gt;
&lt;a href=&quot;http://www.wiredstart.com&quot; class=&quot;bb-url&quot;&gt;http://www.wiredstart.com&lt;/a&gt;  : The Technology Start Page &lt;/pre&gt;</description>
     <pubDate>Sat, 24 Jun 2000 22:37:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1005130 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-i-print-specific-part-file#comment-1005129</link>
    <description> &lt;p&gt;It would be blank.&lt;/p&gt;
 </description>
     <pubDate>Sat, 24 Jun 2000 20:48:00 +0000</pubDate>
 <dc:creator>Vorm</dc:creator>
 <guid isPermaLink="false">comment 1005129 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-i-print-specific-part-file#comment-1005128</link>
    <description> &lt;p&gt;um, is there already data on the 30th line or is it blank?&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;a href=&quot;http://www.birminghamnet.com/search-engines/resources/webmaster_tools/&quot; class=&quot;bb-url&quot;&gt;&lt;strong&gt;CLICK&lt;/strong&gt;&lt;/a&gt; 4 some tested resources for making money $, hosting, and web promotions.&lt;br /&gt;
&lt;a href=&quot;http://www.birminghamnet.com&quot; class=&quot;bb-url&quot;&gt;&lt;strong&gt;My Site&lt;/strong&gt;&lt;/a&gt; got hacked, but i&#039;m coming back?&lt;/p&gt;
 </description>
     <pubDate>Sat, 24 Jun 2000 19:53:00 +0000</pubDate>
 <dc:creator>fairhousing</dc:creator>
 <guid isPermaLink="false">comment 1005128 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
