--- Ovid <[EMAIL PROTECTED]> wrote:
> And this is confusing me because the next line actually uses the
> $result{number} but the code still works. 
> 
>     elsif (!$result{number} and my $extra = $self->_is_extra_line(
> $line )) {
>         my $test         = $totals->{details}[$result{number} - 1];

OK, OK, OK, I'll shut already and stop spamming you people :)

The reason that snippet worked is a bit of blind luck on my part.  I
started thinking about this and realized that the details array must
keep test information in order.  Thus, "$result{number} - 1" worked out
to "-1" when $result{number} wasn't defined, thus pointing me at the
last (and correct) element in the array :)

Cheers,
Ovid

=====
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to