in reply to Parsing and scoring an Array of Arrays
How many items are in the array at $i? Your code never checks. It keeps incrementing $base. Eventually, it's going to run out of items, and Perl will happily attempt to oblige you by autovivifying a new array entry at the new position. It won't be an array reference, though, and there's your error.while (@{$self->{_score}[$i][$base]} ne "0") { $last = $base; $base++; }
As a side note, be careful with your comparisons. You almost certainly don't want to say if ($x = 1) {...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Parsing and scoring an Array of Arrays
by tilly (Archbishop) on Aug 09, 2001 at 09:07 UTC | |
|
Re: Re: Parsing and scoring an Array of Arrays
by mr_dont (Beadle) on Aug 09, 2001 at 04:16 UTC |