To make this page readable, I had to write the html code substituting [ for < and ] for > other wise it couldn't be read.

#!/usr/bin/perl


#running the code
system ("/somedirectory/a.out ");


#make gifs
system("/usr/local/bin/ppmtogif /users/webman/htdocs/animgifs/m.pbm$$>/users/webman/htdocs/animgifs/m.gif$$");
system("/usr/local/bin/ppmtogif /users/webman/htdocs/animgifs/m1.pbm$$>/users/webman/htdocs/animgifs/m1.gif$$");

# write the HTML document

print "Content-type: text/html\n\n";
print "[head][title]Chaotic Pendulum[/title][/head]";
print "[body][center][h3]Chaotic Pendulum[/h3]
";

print "[img align=left src=http://nacphy.physics.orst.edu/animgifs/m.gif$$]";
print "[img src=http://nacphy.physics.orst.edu/animgifs/m1.gif$$]

";
print "[center][hr][/center]";

if ($in{'gif89a'}=~/on/){

system ("/usr/local/bin/gifmerge -1 -l10 /users/webman/htdocs/animgifs/*.gif ] /users/webman/htdocs/animgifs/gif$$");
print "[img src=http://nacphy.physics.orst.edu/animgifs/gif$$][HR]";
}


if ($in{'mpeg'}=~/on/){


$max = $in{'T'}/$in{'t'};
$i = 0;
while ($i [= $max){
if ($i [ 10){
system ("giftopnm /users/webman/htdocs/animgifs/run000$i.gif > /users/webman/htdocs/animgifs/run000$i.pnm");
system ("ppmtoyuvsplit /users/webman/htdocs/animgifs/run$i /users/webman/htdocs/animgifs/run000$i.pnm");
$i = $i + 1;
}
if ( $i ] 9 && $i [ 100 ){
system ("giftopnm /users/webman/htdocs/animgifs/run00$i.gif > /users/webman/htdocs/animgifs/run00$i.pnm");
system ("ppmtoyuvsplit /users/webman/htdocs/animgifs/run$i /users/webman/htdocs/animgifs/run00$i.pnm");
$i = $i + 1;
}
system ("mpeg -a 0 -b $max -h 240 -v 240 /users/webman/htdocs/animgifs/run -s /users/webman/htdocs/animgifs/run.mpg");


}
print "Content-type: text/html\n\n";
print "[head][title]Chaotic Pendulum[/title][/head]";
print "[body][center][h3]Chaotic Pendulum[/h3]
";
print "ChaoticPend.mpg will be here to download soon
" ;
print "[a href=http://nacphy.physics.orst.edu/animgifs/run.mpg]ChaoticPend.mpeg[/a][HR]";


}

if ($in{'fli'}=~/on/){

print "Content-type: text/html\n\n";
print "[head][title]Chaotic Pendulum[/title][/head]";
print "[body][center][h3]Chaotic Pendulum[/h3]
";

system ("ls /users/webman/htdocs/animgifs/*.gif > /users/webman/htdocs/animgifs/$$.lst");
system ("fbm2fli /users/webman/htdocs/animgifs/$$.lst /users/webman/htdocs/animgifs/$$.fli ] /users/webman/htdocs/animgifs/messeges");

print "Click on the .fli to download it.
";
print "[a href=http://nacphy.physics.orst.edu/animgifs/$$.fli]ChaoticPend.fli[/a][HR]";

}
print "[/center][/body]";
; system ("rm /users/webman/htdocs/animgifs/*.gif");
system ("rm /users/webman/htdocs/animgifs/*.pnm");
system ("rm /users/webman/htdocs/animgifs/*.Y");
system ("rm /users/webman/htdocs/animgifs/*.U");
system ("rm /users/webman/htdocs/animgifs/*.V");
system ("rm /users/webman/htdocs/animgifs/*.lst");
system ("rm /users/webman/htdocs/animgifs/*.dat");
system ("rm /users/webman/htdocs/animgifs/*pbm*");