in reply to Lady_TM

How about adding this method?

################################################# # Sub get_nth_element_in_keyed_array # ################################################# ################################################# # PUBLIC Subroutine # ################################################# sub get_nth_element_in_keyed_value_array($$;*){ my $self = shift; local ($key,$place,*TABLE) = @_; my @List = @{$self->get_keyed_value_array($key)} my $i = 0; my ($value) = grep {!(++$i % $place)} @List; return $value; }

I say yes. (Assuming the method works properly.)

-Steeeeeve

Replies are listed 'Best First'.
Re: Re: Lady_TM
by Steeeeeve (Initiate) on Feb 04, 2001 at 09:33 UTC
    ################################################# # Sub get_nth_element_in_keyed_array # ################################################# ################################################# # PUBLIC Subroutine # ################################################# sub get_nth_element_in_keyed_value_array($$){ my $class = shift; local ($key,$place) = @_; my @List = @{$self->get_keyed_value_array($key)}; return $List[$place]; }
    This code is much better. In rare cases it will be nice to get a single element without the entire row.