I fixed it up, and even used your advice to make the program more versatile (i.e. let the user define how many bowlers and games there are as opposed to making it just 4 and 3, respectively.)
In case you're interested, here's the entire {ugly} script.
{my @score; my @ave; my @han; my $i=0; my $j=0; my $k=0; my $l=0; my $o=0; my $teamhand;} print "How many bowlers are there?\n"; chomp(my $n=<>); $n-=1; print "\nHow many games did the bowlers play?\n"; chomp(my $m=<>); $m- +=1; for $i(0..$n){ for $j(0..$m){ $l=$i+1; $o=$j+1; print "\nPlease enter bowler $l s score for game $o: "; chomp($score[$i][$j]=<>); } } for $i(0..$n){ undef $k; for $j(0..$m){ $k+=$score[$i][$j]; } push @ave, int($k/($m)); } for $k(0..$n){ if($ave[$k]<=200){ $han[$k]=int((200-$ave[$k])*(.85)); } if($ave[$k]>=200){ $han[$k]=0; } } for $i(0..$n){$teamhand+=$han[$i];} for $i(0..$n){ $j=$i+1; print "\nBowler $j s Average: $ave[$i] Bowler $j s Handicap: $han +[$i]\n"; } print "\nThe team's handicap is: $teamhand\n";


Thanks again!

In reply to Re^4: Averages in bowling by Andrew_Levenson
in thread Averages in bowling by Andrew_Levenson

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.