Why use Perl when we've got Python?!
Abigail
abigail at delanet.com
Sun Aug 15 05:47:55 EDT 1999
John Stevens (jstevens at bamboo.verinet.com) wrote on MMCLXXIV September
MCMXCIII in <URL:news:slrn7r9nde.h3c.jstevens at bamboo.verinet.com>:
%% 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 :
%% >30
%% >4
%%
%% The @ prefix denotes an array. You, yourself, should learn
%% Perl. Calling an array a list, doesn't make it one.
He doesn't. Please, get yourself a copy of Learning Perl and learn Perl.
I don't see any @ in "(1, 10, 20, 30)", so your point is totally moot.
%% >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.
Arrays and list are 2 different things in Perl. Perl has lists. They
are however, not the same as Python lists. Don't assume that because
someone mentions "list", Python lists are meant.
%% >if you know perl you would know this.
%%
%% I know Perl. You need to learn Python.
The extend of Perl knowledge you have shown in this thread is less
than the average script kiddie knows.
%% >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:
But it doesn't denote lists. Your premise is wrong.
%% @ary = (1, 2, 3);
%% @ary[5] = "Test";
%%
%% But, obviously, this is not illegal.
Indeed. The second line is considered bad style though, and it will
be flagged as a warning with -w. What the second line has to do with
lists, I have no idea. The first line contains a list, on the RHS of
the assignment.
%% >>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?
There isn't. Just like there isn't a prefix character for operators.
There isn't a prefix character for decimal numbers either. What's
your point?
%% >>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!
Let me repeat that: You have no idea what you're talking about.
%% Now I suppose that you will tell me that Perl has stacks, too!
I don't think he will. Sam has shown more Perl knowledge than you have.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
More information about the Python-list
mailing list