title: How can I generate HTML tables in Perl?
body: <p>I need to create a 2 tables in HTML format. Each has 5 rows:</p>
  <h3>1st Table</h3>
  <ul>
  <li>1st row has FRUITS in it, occupying all columns</li>
  <li>2nd row has January(month), occupying all columns</li>
  <li>3rd row has names of some 6 fruits (apple, orange, grapes,...)These names do not change. so this row has 6 columns</li>
  <li>4th row has rates for each fruit ( 10,20,30..) so this has 6 columns.</li>
  <li>5th row has corresponding message for each fruit showing as Available or not.</li>
  </ul>
  <h3>2nd Table</h3>
  <p>If it is available the background color for the cell should be green and if not RED.</p>
  <ul>
  <li>1st row has VEGETABLES in it, occupying all columns</li>
  <li>2nd row has February(month), occupying all columns</li>
  <li>3rd row has names of some 6 vegetables (tomato, potato..)These names do not change. so this row has 6 columns</li>
  <li>4th row has rates for each vegetable ( 10,20,30..) so this has 6 columns.</li>
  <li>5th row has corresponding message for each vegetable showing as Available or not.If it is available the background color for the cell should be green and if not RED.</li>
  </ul>
  <p>All this data is read from a file having a particular format, it is</p>
  <pre>&lt;name of fruit/vegetable> price &lt;available or not></pre>
  <p>The names of fruits and vegetable do not change , it will be same for both the tables.
  However, it might be possible that data for a particular fruit/vegetable is not present.
  if it is not present the column for that should show N/A with white background.</p>
  <p>I cannot use <a href="http://search.cpan.org/perldoc/MIME::Lite" rel="nofollow noreferrer">MIME:Lite</a> for this.
  Need to use <code>print &lt;&lt;ENDHTML;</code></p>