in reply to Making a dynamic high scores table
When you declare a variable with my, you initialise it. If you do this inside a loop, the variable is re-initialised on each loop iteration. But if you want the variable to grow as the loop iterates, you need to declare it once only, before the loop:
my @initials; my @scores; while (...) # The major loop { ... push @initials, $initial_add; push @scores, $score_total; ... } # access @initials and @scores here
Hope that helps,
Athanasius <°(((>< contra mundum
|
|---|