Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: psss...I want to move from Perl to Python Date: Sat, 30 Jan 2016 11:21:31 +1300 Lines: 23 Message-ID: References: <56ab10f4$0$1606$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net JsMuDBRrOiFI2h2a/4qJWA3D7mDXQk+JCAws2tbUB45rqDmlx6 Cancel-Lock: sha1:O6AuaSB+QhoQu1KiGx9o4X0stcg= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:102255 Random832 wrote: > The main source of confusion is that $foo[5] is an element of @foo. > $foo{'x'} is an element of %foo. Both of these have absolutely nothing > to do with $foo. And this is where Perl seems totally insane to me. Obviously it knows from the square brackets that foo[5] is referring to the array called foo rather than the scalar called foo or the hash called foo. So what purpose do the sigils serve, other than provide you with the opportunity to use the wrong one? I know there's probably an answer to that question, but the point is that it *looks* screwy to someone coming from any other language on the planet. I'm glad I learned Python first so I didn't have to unlearn stuff like that. Was it Dijkstra who complained about students whose minds had been damaged by BASIC? Perl damage must be ten times worse... -- Greg