I changed the module into a state space search module.
It does the same thing and it is now more general so it does more. http://www.gidon.com/scratch/state_space_search.pm.txt Thanks for the feedback. With your help I realized that what I was really doing was a state space search. And so with that in mind I have improved the module a bit. I will submit it to CPAN AI shortly. Thanks for the feed back! Gidon