![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Cartesian Cross-Productsby waba (Monk) |
on Apr 23, 2008 at 20:39 UTC ( [id://682491]=note: print w/replies, xml ) | Need Help?? |
It is indeed the Perl way to do it if you know in advance how many arrays you'd like to get the product of. If you don't, Japhy's algorithm is the way to go - even if it looks C-ish with a lot of indices. I suspect that it may be faster as well, using the array pre-allocation optimisation pointed out earlier.
In Section
Craft
|
|