<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1001017" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1001017</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-editing-small-script#comment-1004327</link>
    <description> &lt;p&gt;Ok, here is the code you need&lt;br /&gt;
&lt;BLOCKQUOTE&gt;code:&lt;/blockquote&gt;&lt;/p&gt;
&lt;pre&gt;
#!/usr/bin/perl 
use LWP::Simple;
$html = get(&quot;http://www.kcc.net/hcs/homework.htm&quot;);

while($html =~ m/Grade 9 Homework&amp;lt;\/font&amp;gt;&amp;lt;\/b&amp;gt;&amp;lt;\/td&amp;gt;\s+&amp;lt;\/tr&amp;gt;(.+?)&amp;lt;td width=&quot;18%&quot; bgcolor=&quot;#008000&quot; align=&quot;center&quot;&amp;gt;/sogi)
{
	$grade9 = &quot;&amp;lt;table border=\&quot;1\&quot; width=\&quot;100%\&quot;&amp;gt;$1&amp;lt;\/table&amp;gt;&quot;;

}

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

An example of it can be viewed at  &lt;a href=&quot;http://dlo.net/~rob/cgi-bin/grade9.cgi&quot; class=&quot;bb-url&quot;&gt;http://dlo.net/~rob/cgi-bin/grade9.cgi&lt;/a&gt; 

To use it on your page if you have SSI you can go

&amp;lt;!--#exec cgi=&quot;/cgi-bin/grade9.cgi&quot;--&amp;gt;



------------------
&lt;strong&gt;Termites eat through wood two times faster when listening to rock music.&lt;/strong&gt; &lt;/pre&gt;</description>
     <pubDate>Mon, 13 Mar 2000 15:38:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1004327 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-editing-small-script#comment-1004326</link>
    <description> &lt;p&gt;Please...  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 13 Mar 2000 04:01:00 +0000</pubDate>
 <dc:creator>Steve</dc:creator>
 <guid isPermaLink="false">comment 1004326 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-editing-small-script#comment-1004325</link>
    <description> &lt;p&gt;Umm, could you explain it a little better. I&#039;m not &lt;em&gt;that&lt;/em&gt; good at CGI.&lt;/p&gt;
&lt;p&gt;-steve&lt;/p&gt;
 </description>
     <pubDate>Sun, 12 Mar 2000 02:11:00 +0000</pubDate>
 <dc:creator>Steve</dc:creator>
 <guid isPermaLink="false">comment 1004325 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-editing-small-script#comment-1004324</link>
    <description> &lt;p&gt;Set a flag variable up to check for the begining of the section you wish to import(I have inserted text to look for a link tag=9):&lt;/p&gt;
&lt;p&gt;Outside the foreach block set $start=0;$end=0;&lt;/p&gt;
&lt;p&gt;Then just inside the foreach block set the test&lt;/p&gt;
&lt;p&gt;if($line=~/&amp;lt;A NAME=&quot;9&quot;&amp;gt;/){&lt;br /&gt;
  $start=1;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Then set a flag variable up to check for whatever denotes the end of your data section -or- what denotes the start of the next (I have inserted a link tag for grade 10)&lt;/p&gt;
&lt;p&gt;if($line=~/&amp;lt;A NAME=&quot;10&quot;&amp;gt;/){&lt;br /&gt;
  $end=1;&lt;br /&gt;
}&lt;br /&gt;
Then just set a control if block within the foreach block&lt;br /&gt;
if($start &amp;amp;&amp;amp; !$end){&lt;br /&gt;
....&lt;br /&gt;
The rest of the foreach block here&lt;br /&gt;
....&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Now just change the URL variable to&lt;br /&gt;
$doc=get &quot;http://www.kcc.net/hcs/homework.htm&quot;;;&lt;/p&gt;
&lt;p&gt;and clean up the footer.&lt;/p&gt;
&lt;p&gt;Tazman&lt;/p&gt;
 </description>
     <pubDate>Fri, 10 Mar 2000 10:36:00 +0000</pubDate>
 <dc:creator>tazman</dc:creator>
 <guid isPermaLink="false">comment 1004324 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
