listmail [mailto:[EMAIL PROTECTED] wrote:
>
> Well I'm not seeing why a number of arrays that each point to arrays
> could not be consider a matrix of arrays when considering one definition
> of the word matrix "Something resembling such an array, as in the
> regular formation of elements into columns and rows". I dunno, i'm not
> trying to argue with you of course. It is apparent that I truly am
> confused with Perl References again. I beleive my main mistake could be
> using "foreach my $record (@{ $results })" instead of what you've shown
> "for my $record (@{ $results })". I'll test this later when I get a
> chance and also see how I can include the use of bind variables while
> using this method as well.
>
You can certainly call it a matrix if you want to, but other people may not
know what you mean. (I didn't, when I read your original post.) The
standard Perl terminology is to call it an array of arrays.
foreach and for in Perl are completely interchangeable.
These two are the same:
foreach my $x (@list)
for my $x (@list)
These two are also the same:
for (my $i = 0; $i < 10; ++$i) {
foreach (my $i = 0; $i < 10; ++$i) {
Which you use is merely style/personal preference.
Ronald