Mostly it was all the terrible code that got written in Perl by the first wave of non-programmers to start building web apps.
Perl, as confusing as it can seem, has fairly consistent rules that it follows. Learning those and keeping them in mind will generally let you intuit how something is expected to work.