in reply to Creating, Using, and Manipulating Matrices' values

A general comment is that these sort of queries could be done more easily with a relational database.

For the current problem, it sounds like you want a Cartesian product to form all possible sentences.

@a = qw|Bob Sue|; @b = qw|Ted Mary|; @c = qw|Biff Muffy|; my @all_combos; for my $a (@a) { for my $b (@b) { for my $c (@c) { push @all_combos, "$a has a meeting with $b and $c\n"; } } }

-Mark