in reply to My brain hurts! Recursive directory algorithm..

I think Algorithm::Bucketizer might be a good starting point.

It doesn't have your "keep things together" constraint it looks like, but you might be able to adapt it for your needs.
--
Mike

  • Comment on Re: My brain hurts! Recursive directory algorithm..