psss...I want to move from Perl to Python

Ulli Horlacher framstag at rus.uni-stuttgart.de
Fri Jan 29 04:12:19 EST 2016


Steven D'Aprano <steve at pearwood.info> wrote:

> Every time I make a half-hearted attempt to learn enough Perl syntax to get
> started, I keep running into the differences between $foo, %foo and @foo
> and dire warnings about what happens if you use the wrong sigil

I have started learning Python several times and surrendered because my
brain was too Perl hardcoded after 30 years, but NOW I was successful :-)
(I still find Perl syntax better...)

About the variables in short:

$foo is a scalar (number, string, reference, file handle)
@foo is an array
%foo is a hash (dictionary in Python slang)

and yes, you can use them all together in same code, they are different.

For more discussion about Perl syntax one should better go to
comp.lang.perl

-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher at tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/



More information about the Python-list mailing list