1) Fix it
2) Rewrite it and learn a new language
My choice was leaning towards 2). What do you think about Perl 6 / Raku?
Don't expect to be able find a full-time job in Raku just yet. But more experienced developers will always be better paid than developers that haven't looked beyond their side of the hill.
You'll love the language.
It's very expressive and flexible. The community is super friendly.
If you're into more serious things, there are some projects you might like.
For example cro - framework to develop web APIs.
As for production readiness - I have used the language at my devops @job for a couple of years.
Best.
Aleksei
I'm still planning to look into Perl 6. What I like about Perl 5.x is its high out-of-the box availability (ie: no need to ask sysadmin to allow/install Ruby, Node etc..), so I find ideal for some basic automation scripts.
However, I have never really managed to get used to its (Perl 5's) syntax. I can create, initialize and iterate through a map/'hash table' in C++ without looking up the docs. Perl... is different, I have a hard time making its idioms stick. I am curious as to whether Perl 6 brings big changes syntax-wise and whether I can expect it to be overall more intuitive (not in general, but for this one programmer that is.)
From a profitability standpoint, your time is better invested into getting better at whatever language you'er currently using or learn a new language that will give you more career opportunities. Learning a niche language that has no major selling points over the major existing languages is a pure waste of time that will never pay off.