in reply to $#{$array_ref} changes in loop
You are bitten by autovivification:
while ( $eventscores->[$i]->[0] == $rider_id ){
If $i at this time points beyond the end of the array, an arrayref will spring into existence, as you dereference the hitherto unexisting element.
Solution: Don't do that. A common strategy is to protect the dereferencing:
while ( $eventscores->[$i] and $eventscores->[$i]->[0] == $rider_id ){
Depending on the rest of your outer loop, other solutions may be cleaner though.
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|