At this point, I think that many programmers are working on the same project...
#!f:/perl/bin/perl.exe -w use strict; my $PowerballHistoricFile='d:/code/perl/lottery/powerball_numbers.txt' +; my(%History,$Date,@Numbers); open(HISTORY,$PowerballHistoricFile) or die "Could not open $Powerball +HistoricFile!"; foreach my $Line(<HISTORY>){ ($Date,@Numbers)=split(/ /,$Line); $History{$Date}=[@Numbers]; } close(HISTORY); my(%Frequency,%Frequency2); foreach my $Key(sort(keys(%History))){ for my $SubCounter(0..4){ $Frequency{$History{$Key}[$SubCounter]}++; } } foreach my $Key(sort(keys(%Frequency))){ if($Frequency2{$Frequency{$Key}}){ $Frequency2{$Frequency{$Key}}.=", $Key"; } else { $Frequency2{$Frequency{$Key}}=$Key; } } print "Content-Type: text/html\n\n<html><body>\n"; print qq(<br><table border="1" cellpadding="2" cellspacing="0" align=" +center"><caption style="font-size: 15px; font-weight: bold;">Power Ba +ll Historic Information</caption>\n); print qq(<tr bgcolor="#dddddd"><th>Number of Drawings</th><th>Numbers< +/th></tr>\n); foreach my $Key(sort(keys(%Frequency2))){ print qq(<tr><td align="center">$Key</td><td>$Frequency2{$Key}</td +></tr>\n); } print qq(</table>\n</body></html>\n); exit;


Chris

In reply to Re: Powerball mania! by ckohl1
in thread Powerball mania! by patgas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.