in reply to Name Me! MixMatch?

An alternate approach for the same kind of problem is to use functional techniques as at Re (tilly) 1 (perl): What Happened...(perils of porting from c).

Also note that if you have a large number of possible options to go through, this will be less memory intensive.