There are certain things I don't expect to achieve now that I'm past 40. Winning the Tour de France is out of the question at this point (VO2-max declines with age, after all), though that doesn't stop me from enjoying doing hill repeats until my lungs ache and legs burn just for the challenge of it. Reading the wattage and voltage on the back of an iPhone wall-wart will heretofore require the aid of some form of high quality optics (the ability of the human eye to focus at close distances universally declines with age). And I will never have a promising career in the NBA -- most of those guys are done by their early 40's if not sooner.
Pretty much everything else that is slightly less physically demanding is still wide open to me, and should be to you too. I have no regrets that I didn't learn the pommel horse while I was still in my teens; I filled those years with other experiences. But it would be a lousy second half of a life if I weren't allowed to learn anything new, or to pursue new ideas, concepts, and disciplines. I'm looking forward to it.
If you enjoy programming, stick with it. Don't sell yourself short. None of us got comfortable with Perl (or any other programming language, for that matter) without spending some time with it, or without experiencing frustrations and cognitive barriers that had to be broken through along the way.
So if we can dismiss this notion that we're done learning at (or near) 40, let's look at what needs to be done to learn a new skill (Perl included):
- You've got to spend time actually exercising the skill. Tinker a little every day. Set aside ten minutes, or a half hour. And in that time each day, solve some trivial problem that you've thought about throughout your day.
- You've got to study it. Read the POD, or some good Perl books. But don't limit yourself to just Perl books; Perl is useless in a vacuum. Perl's power is that it's so useful across a broad range of problem domains, so learn about other problem domains too.
- Find some larger projects to participate in (hopefully ones that others work on as well -- you'll learn from others).
- Repeat... every day, for weeks, months, and years (or at least as long as you still enjoy it)