You need to first learn and understand why your current approach fails. Combinatorial Explosion and Cartesian Product are most likely good candidates for reading.
After that, Higher Order Perl explains the "odometer" technique for implementing a way to enumerate combinations without needing much memory. In fact, if you already know how to program, the whole book is quite good reading.
After that, you should be able to understand Algorithm::Loops and should be able to use it.
In reply to Re: How can one get the correct results of all combinations with bigger input files?
by Corion
in thread How can one get the correct results of all combinations with bigger input files?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |