<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019170" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019170</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/edit-flat-file-perl#comment-1114238</link>
    <description> &lt;p&gt;Nevermind, I didn&#039;t get it when I first responded. I see the chomp; thing now. I like it. Exactly what I&#039;m looking for!&lt;/p&gt;
&lt;p&gt;Thanks much,&lt;br /&gt;
Graham&lt;/p&gt;
 </description>
     <pubDate>Tue, 17 Sep 2002 05:46:52 +0000</pubDate>
 <dc:creator>spragueg</dc:creator>
 <guid isPermaLink="false">comment 1114238 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/edit-flat-file-perl#comment-1114237</link>
    <description> &lt;p&gt;Ok That&#039;s what I thought however I am troubled by the writing it back part. Wouldn&#039;t MYFILE contain the original file contents. but you&#039;re showing only writing back the one line. Wouldn&#039;t I have to replace the current file in @lines with the new data and then put the @lines back into MYFILE? Then write the file?&lt;/p&gt;
 </description>
     <pubDate>Tue, 17 Sep 2002 05:29:30 +0000</pubDate>
 <dc:creator>spragueg</dc:creator>
 <guid isPermaLink="false">comment 1114237 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/edit-flat-file-perl#comment-1113801</link>
    <description> &lt;p&gt;quick sample&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;	open(MYFILE, &amp;#039;path/to/myfile&amp;#039;) || die();&lt;br /&gt;	my @lines = &amp;lt;MYFILE&amp;gt;;&lt;br /&gt;	close(MYFILE);&lt;br /&gt;&lt;br /&gt;	open(MYFILE, &amp;#039;&amp;gt;path/to/myfile&amp;#039;) || die();&lt;br /&gt;	foreach(@lines) {&lt;br /&gt;		chomp;&lt;br /&gt;&lt;br /&gt;		# split the line into column data&lt;br /&gt;		my ($id, $fname, $lname, $moredata) = split(/\t/);&lt;br /&gt;&lt;br /&gt;		if($id == $idYouWantToChange) {&lt;br /&gt;			# do stuff with the line here&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		# write the line back to file&lt;br /&gt;		print MYFILE &amp;quot;$id\t$fname\t$lname\t$moredata\n&amp;quot;;&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	close MYFILE;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 15:21:31 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1113801 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/edit-flat-file-perl#comment-1113787</link>
    <description> &lt;p&gt;Yes, I can guide you and provide sample code, but firstly, can you supply us with sample data? Can you give me a snapshop of the file? And also, what part of the file (which column) would you like to modify?&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 13:16:03 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1113787 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
