Interesting, I've been moving away from Perl and Python and towards Rust precisely because I'm afraid of bitrot. Perl the language is stable as fuck and takes back-compat extremely seriously. The problem for me was the library ecosystem: Cpan makes it tedious to pin/vendor dependencies, and installs dependencies globally by default.
You might want to look at Carton and cpanfiles as a way of managing dependencies. You can also get really ancient stuff off BackPAN, should your dependencies disappear from CPAN proper.
Yes, dependencies are a bit of a problem (I tried to use as few as possible in ccheck), but I'd say that the general culture of CPAN is to keep things long-term and prevent breakage, so my experience has been fairly good over the last 25 years. Something I can't say for node.js.