Also, how does Perl not have associative arrays? Oh, you mean that vectors and dictionaries are separate types, whereas PHP has one type that does both poorly? Yeah, I'm sure that's why PHP is so popular.
(What is it with people writing about Perl as though they are experts without ever having written a Perl program?)
What is it with people writing about Perl as though they are experts without ever having written a Perl program?
I've long believed that some sort of rigorous comparative linguistics education would only benefit programmers. Certainly it could have squelched some of the howlers in this article.
In Perl, you can pass only one kind of argument to a subroutine: a scalar. To pass any other kind of argument, you need to convert it to a scalar. You do that by passing a reference to it. A reference to anything is a scalar. If you're a C programmer you can think of a reference as a pointer (sort of).
... which I found because I, unlike the OP, happen to remember that the thing-which-is-sort-of-like-a-pointer-only-not-really in Perl is called a reference.
So let me help the original author: What he meant to say is that "Perl has things that remind me of pointers, but have a different name, and that aren't exactly pointers, but are nearly as confusing as real pointers, especially to someone who just wants to put up a simple web page in five minutes."
Looking back at my own experience as a newbie developer in 1995, the convenience of PHP was absolutely the reason I picked PHP over perl, and having arrays that could also be dictionaries if I changed my mind was a big part of that.
What kind of programs are these where you don't have to rewrite a bunch of other code anyway to account for the difference between keyed and indexed lookups?
Also, how does Perl not have associative arrays? Oh, you mean that vectors and dictionaries are separate types, whereas PHP has one type that does both poorly? Yeah, I'm sure that's why PHP is so popular.
(What is it with people writing about Perl as though they are experts without ever having written a Perl program?)