Meanwhile, Javascript and Python are eating everyone's lunches. .NET and Swift are doing pretty well too, but JS in particular is derided as a "bad" language with tons of problems, yet it's bursting at the seams with developers. How can this be so?
Frankly, it's because you can take a random person off the street and turn them into a decent JS developer in like two weeks. JS may be formally inconsistent, but it's seems easy enough for most people to get it. It's quick to see and get results, so new developers don't get discouraged.
If Perl wants to be popular, it needs to attract users on how easy it is. This was one of the shifts Python has made over the years (getting easier for new users) and it continues to grow its userbase.