The combination of garbage collection, good string support, and a huge set of easy-to-use third-party modules made Perl insanely productive relative to the other options at the time. Remember - Python didn't release a 1.0 until 1994, and Java 1.0 didn't come out until 1996, and the early versions of those languages were missing a lot of features you'd recognize today, and still had plenty of bugs and performance issues to work out. By 1994 Perl had been out for >6 years, and reached version 5.0 that year. In both capabilities and maturity, it was ahead of the other free alternatives, and way ahead of trying to wrestle with string templating in C or C++. Perl enabled a ton of cool things to be built much more quickly than they would have with the other tools available at the time.
At the same time, it's hard to see a viable niche for Perl going forward. The advantages I mentioned above are no longer unique to Perl - they're now table stakes for any mainstream language. Every mainstream language has a package archive now. There are at least 7 mainstream general-purpose languages with a garbage-collecting runtime, with quality ranging from decent to incredible. Every language except C evolved decent support for string manipulation. Perl deserves tremendous credit for leading the way in making these things mainstream, but it has left Perl with very few distinguishing advantages.
Without those advantages, Perl seems destined to gradually fade away. The sheer mass of existing code means it will probably never be gone - there will always be important systems still running on Perl. But very few greenfield projects will use it, and fewer programmers will learn it in the future.
We can quibble about why Perl has gradually faded from relevance. Personally, I think people generally overweight the importance of the Perl 6 announcement, and underweight the impact of Apache's mod_php in shifting usage away from Perl. mod_php enabled hosting providers to safely enable PHP on shared hosting, while mod_perl couldn't be used in that context, because users could affect the Perl environments of other users on the same system. As a result, PHP hosting was cheap and had tons of options, while Perl hosting required a more expensive option like VPS or a dedicated box. This kick-started the PHP ecosystem, and its growth came largely at the expense of the Perl web development ecosystem. One could imagine an alternative world in which PHP never took off, and Facebook, Wikipedia, Wordpress, etc. were all started in Perl, but that's not the world we live in.