Perl was never as popular as JavaScript has become lately, partly because we never had a reason to popularise Perl in startup culture – where a teenager in his bedroom can make the next twitter craze – and partly because technology was just not as hot or nearly as pervasive back then.
If you look at the current trends, Perl is actually being replaced on a fairly large scale by Python and Ruby (other dynamic languages,) which, depending on who you ask, solve some of the maintenance problems and complaints that people have of Perl, and JavaScript is very likely to go through the same life-cycle – to be replaced by Dart, CoffeeScript, or "something else." As it stands today, JavaScript is being used much like an Assembly language...