Assuming no bugs in the code or anything done "fancy", is the following code Perl?

$cssClass = ""; if ( $element->isOpen() ) { $cssClass = ' class="selected"'; } if ( !$element->isHiddenInNavigation() ) { $filepath = $element->getId() . ".html"; if ( substr( $element->getFilePath(), 0, 4 ) == 'http' ) { $filepath = $element->getFilePath(); } $result .= '<li' . $cssClass . '><a href="' . $filepath . '">' . $element->getLabel() . '</a>' . $this->generate( $element->getChildren() ) . '</li>'; }

Look at that code carefully. Really carefully. If we assume it does not have bugs, then we know this is probably not Perl (I'm not telling you the giveaway in case it takes you a while to see it).

That language is PHP, yet clearly the sigils haven't killed PHP. Due to PHP's extremely arbitrary case and argument ordering conventions, it seems to require more memorization than Perl does, thus suggesting that for two cleanly written pieces of code, the PHP might actually be harder to understand than Perl. So why have they cleaned Perl's clock in the Web space? I think there are two reasons.

First, when Perl hit it big in the late 90s, we were the easiest way to get CGI code up and running fast. PHP clearly wins in this area now.

Second, let's take a look at some more PHP, something which makes the distinction much clearer:

public function setHiddenInNavigation($hideInNavigation) { return $this->hideInNavigation = $hideInNavigation; }

Can you do that in core Perl? No, you can't. It's an embarrassment. We're harder to use for the uses many (most?) people want and our language is so primitive in one of the most fundamental ways that we sort of deserve some of the harshness we get. Moose (and maybe MooseX::Declare) needs to be in the core, or at least something along those lines.