in reply to How to use __DATA__ efficiently, help!

You're going to quickly outgrow this method of generating html output from logically calculated values. Interspersing code with content is good for the quick and dirty jobs, but it won't work out very well for you at all as you continue to grow your code and improve upon it.

I invite you to consider a templating engine, such as Template::Toolkit or others mentioned already in response to your question. There is a slight learning curve, but I can assure you with almost complete certainty that once you get to the point where you are actively using and deriving benefit from a templating solution that allows for the separation of code and content, you will won't ever go back to the more primitive and less elegant practice of doing otherwise.

--
Tommy
  • Comment on Re: How to use __DATA__ efficiently, help!