#!/usr/bin/perl
print "Content-type:text/html\n\n";

print<<__EOQ__;
<HEAD><TITLE>Power Stone 2 Mix-o-Matic</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF">
<div align="center">
<B>ALL MATERIALS</B> - <A HREF=".">Back to Mix-o-Matic</A><P>
<TABLE><TR><TD>

__EOQ__


open(READ,"ingred.txt");
while(defined($line=<READ>)){
    chomp $line;

    $line =~ /^(\d+)\#(.*)\#(.*)$/;

    $itemno = $1;
    $itemname = $2;
    $stuff = $3;

    if($stuff =~ /^(.*)(\ \ +)(.*?)$/){

    $rarity = $1;
    $cost = $3;
}
    if($oldrarity ne $rarity){
	$oldrarity = $rarity;
	print "<B>$rarity</B><BR>\n";
    }
    print "\@$itemno $itemname - $cost GP<BR>\n";


}
    



close READ;


print "</TD></TR></TABLE>\n\n";













