My projects are never done......
I always wonder if there was a better way.....
If only I could reduce the code a few more lines.....
I do not know how many times I felt elated after coding a solution to a problem for the first time, especially if I had to work hard at it or had many failed attempts. I can tell that, how many ever times it was, every single time I felt that a better solution existed a while later.
For me, the satisfaction comes in figuring out a solution and not in the end result. I need to make a conscious decision to either pursue those solutions or not. Will the thrill of the hunt be as exciting? Will I run into more or less tangent problems? There are many more factors that influence that decision than the ones I listed, but ultimately, I need to assess for myself if it is worth the effort.
You sound to be a purist like me. I want everything to boil down to its core with all pollutants gone. I do not know if this will help you, but here are some things I do to add to the satisfaction of my programming (Perl or otherwise). How long before it is completed, how efficient should it be, how much functionality should it have? I ask those questions and give realistic answers, then I raise the bar - just a little.
There aren't any answers for those that seek perfection.