I took damndirtyape and co.'s advice, and I was able to fix the problems. Now I added more and have the same problem of when I use strict it tells me it "aborted due to compilation errors". When I comment out the use strict line, it works fine. Also, is there a way to perform an on the fly check of values, i.e. print "$hoursWorked{january}{name} or 0"; as you'll see on the red line. Here's the code:
#!/usr/local/bin/perl print "Content-type: text/html\n\n"; use CGI::Carp qw(fatalsToBrowser); #use strict; use CGI; my $q = new CGI; my ($month, $num, @data, $date, $hours, $name, $member, $member1); my $ttlevnts = 0; my $name1 = $q->param("name"); my %ttlhrs = ("bottum", 0, "budrow", 0, "captan", 0, "hughes", 0, "mar +chand", 0, "medina", 0, "newbrough", 0, "rico", 0, "shelton", 0, "swe +redoski", 0, "tryon", 0, "werner", 0, "williamspearce", 0); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t +ime); my @members = ("bottum", "budrow", "captan", "hughes", "marchand", "me +dina", "newbrough", "rico", "shelton", "sweredoski", "tryon", "werner +", "williamspearce"); my $month1 = $mon+1; my $year1 = $year+1900; my $date1 = "$month1\/$mday\/$year1"; my %hoursWorked; open(DATA, "/host/n/b/p/p/o/r/nbpdexplorers.port5.com/cgi-bin/data2.tx +t") or die "Cannot open database file: $!"; while (<DATA>) { chomp($_); @data = split(/\+/, $_); $month = shift(@data); $hours = pop(@data); $ttlevnts++; foreach $name (@data) { $hoursWorked{$month}{$name} += $hours; } } close(DATA); for my $month1 (keys %ttlhrs) { $total{$_} += $ttlhrs{$month1}{$_} for keys %{$ttlhrs{$month1}}; } print $q->start_html( -title => "Hours Worked Status", -bgcolor => "wh +ite", -base => true, -xbase => "http://nbpdexplorers.port5.com/" ), $ +q->br; print "<center>"; print $q->h1("Hours Worked Status"), $q->br, $q->h3("Today's Date: $da +te1"), $q->br, $q->h3("Total Event(s): $ttlevnts"); print "<table border>\n"; print "<colgroup align=\"center\" span=\"27\">\n"; print "<tr><td></td><td><th>January</td><td><th>February</td><td><th>M +arch</td><td><th>April</td><td><th>May</td><td><th>June</td><td><th>J +uly</td><td><th>August</td><td><th>September</td><td><th>October</td> +<td><th>November</td><td><th>December</td><td><th><b>Total Hours</b>< +/td></tr></colgroup><colgroup align=\"left\">\n"; foreach $member (@members) { $member1 = ucfirst($member);
print "<tr><td><th>$member1<td>$hoursWorked{january}{$member}<td><td>$hoursWorked{february}{$member}<td><td>$hoursWorked{march}{$member}<td><td>$hoursWorked{april}{$member}<td><td>$hoursWorked{may}{$member}<td><td>$hoursWorked{june}{$member}<td><td>$hoursWorked{july}{$member}<td><td>$hoursWorked{august}{$member}<td><td>$hoursWorked{september}{$member}<td><td>$hoursWorked{october}{$member}<td><td>$hoursWorked{november}{$member}<td><td>$hoursWorked{december}{$member}<td><td></tr>\n";
} print "</table><center><p><a href=\"http://nbpdexplorers\.port5\.com/c +gi-bin/mainpage.cgi\?name=$name1\"><h3>Back To Administrative Options +</h3></a>\n"; print "</p></center></body></html> \n";

20021119 Edit by Corion : Added READMORE tag


In reply to use strict again by Anonymous Monk

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.