in reply to Optimizing Output

So is it more efficent (correct?) to store output in a scalar and then "print" it when your done generating output or to make several prints.

Do the simplest thing that works. Then, if there proves to be a performance problem, profile (measure) before deciding what to do. Optimizing before you have data is almost always a waste of time. And once you have the data, you'll often find that the issue is algorithmic.

I often gather up strings into a scalar for later printing, and though I've often daydreamed up super-efficient way of doing this, the applications always either seem to be fast enough, or the performance issues are solved by doing a more effective query against the database.