in reply to Re: array in for loop
in thread array in for loop
perhaps if I send in the entire code and the data file.
open scores, "a:/scores.txt" || die "what did you idiots do with the s +cores file."; while(<scores>){ chomp; my (@names, @score) = split /:/; $dev=1; for($ctr=0; $ctr<@score; $ctr++){ print "@score\n"; $a = $a + @score; $dev++; print "$dev"; } $b = $a / $dev; print "the average of the scores is $b "; }
zon moy:100:jack douglass:99:abe douglass:98:thomas severson:97:bobby beavers:96:carla steinke:95:bona hayes:94:mike fedie:93:norma sanders:92:jamie maddox:91:scott summers:90:alex summers:89:kitty pryde:88:doug ramsey:87:clarence thomas:86:loki moy:85
Will this info help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: array in for loop
by jasonk (Parson) on Feb 27, 2003 at 18:24 UTC | |
by zonmoy (Initiate) on Feb 27, 2003 at 19:03 UTC |