Why use Perl when we've got Python?!

Sam Holden sholden at pgrad.cs.usyd.edu.au
Fri Aug 13 22:32:12 EDT 1999


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 :
30
4

Perl has lists, if you know perl you would know this. If you program in perl 
and don't know this, then you must get very very confused at times.

>
>Python, however, has an array module as part of its standard library.
>
>I will assume that a list module is available for Perl.

No it is one of the built in bits... like hashes and arrays.

>
>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.

-- 
Sam

Can you sum up plan 9 in layman's terms? It does everything Unix does
only less reliably.
	--Ken Thompson




More information about the Python-list mailing list