Why use Perl when we've got Python?!

John Stevens jstevens at bamboo.verinet.com
Fri Aug 13 23:08:33 EDT 1999

On 14 Aug 1999 02:32:12 GMT, Sam Holden <sholden at pgrad.cs.usyd.edu.au> wrote:
>On 13 Aug 1999 20:04:03 -0700, John W. Stevens <jstevens at basho.fc.hp.com> wrote:
>>> In comp.lang.perl.misc, 
>>>     "John W. Stevens" <jstevens at basho.fc.hp.com> writes:
>>> :$b[ 2 ] = $c;
>>> :
>>> :> That's just fine in Perl.  It's not fine in Python, because Python
>>> :> won't automatically grow an array.
>>> :
>>> :'Cause it doesn't have arrays (or, at least, not built in ones).
>>> Gosh, that's a feature.  NOT.
>>Perl doesn't have lists.  Python doesn't have built-in arrays.
>You should learn some perl you now..
>@array = (1,10,20,30);
>$from_list = (1,10,20,30);
>$from_array = @array;
>print "$from_list\n$from_array\n";
>Will output :

The @ prefix denotes an array.  You, yourself, should learn
Perl.  Calling an array a list, doesn't make it one.

>Perl has lists,

Not built in, it doesn't, unless you define array and list as being
different words for exactly the same type/class.

>if you know perl you would know this.

I know Perl.  You need to learn Python.

>If you program in perl 
>and don't know this, then you must get very very confused at times.

If @ denotes list, then the following Perl would be illegal:

@ary = (1, 2, 3);
@ary[5] = "Test";

But, obviously, this is not illegal.

>>I will assume that a list module is available for Perl.
>No it is one of the built in bits... like hashes and arrays.

Really?  What is the prefix character that denotes a list?

>>I wasn't trying to compare features, I was simply pointing out
>>that your comparison was Apples and Oranges, and therefore at
>>least somewhat invalid.
>Only because you have no idea what you are talking about.


Coming from somebody who doesn't know the difference from *EMULATING*
a list with an array, vs. a real array, that is a good one!

Now I suppose that you will tell me that Perl has stacks, too!

John S.

More information about the Python-list mailing list