With the parsing logic embedded, it seems like a very specific tool that targets an uncommon input format. That's not "generally useful", and probably doesn't make for a great CPAN candidate.
If you write the loop such that one could pass in a subref, it might be a more generalized tool, but then it's just a loop, and I don't see much advantage to it.
This isn't to say you're not onto something. I just think it would require that you decide what exactly you want your module to accomplish. Throughout this thread I just see a module that handles a specific type of data that nobody else is likely to need to handle.