I want to read through an html file and write some html in the middle of it.
Here is what I have so far
#!/usr/bin/perl
use CGI qwstandard);
print "content-type: text/html\n\n";
$topic = param('topic');
$name = param('name');
$date = param('date');
$story = param('story');
open(infile, ">>../amos.html") or die $!;
while ($line=<infile>)
{
print infile <<EOF if $line =~ /<!--ADDHERE-->/;
<div class="news">
<p class="newshead" lang="en">
<b>$topic</b><br />
<font size="0.90em">$date by $name</font>
</p>
<div class="newsitem">
$story
</div>
</div>
EOF
}
Amos
Computer Science
U of MO - Rolla
Here is what I have so far
#!/usr/bin/perl
use CGI qwstandard);
print "content-type: text/html\n\n";
$topic = param('topic');
$name = param('name');
$date = param('date');
$story = param('story');
open(infile, ">>../amos.html") or die $!;
while ($line=<infile>)
{
print infile <<EOF if $line =~ /<!--ADDHERE-->/;
<div class="news">
<p class="newshead" lang="en">
<b>$topic</b><br />
<font size="0.90em">$date by $name</font>
</p>
<div class="newsitem">
$story
</div>
</div>
EOF
}
Amos
Computer Science
U of MO - Rolla