in reply to
Generate Matrix in perl
Set::CrossProduct
should do what you want, if I understood your question correctly.
Comment on
Re: Generate Matrix in perl
In Section
Seekers of Perl Wisdom