Hashes

Hash Element Access

To access an element of a hash, use syntax that looks like this:
$hash{$some_key}
This is similar to what we used for array access, but here we use curly braces instead of square brackets around the subscript(key). … Read the rest

subroutines

As other languages do, Perl has the ability to make subroutines, which are user-defined functions. The subroutine name comes from a separate namespace, so Perl won’t be confused if you have a subroutine called &fred and a scalar called $fredRead the rest

弱者的悲哀

3月31号,去大江东考场练习科目三,包括自己在内一共五个学员,早上七点半就到场地了,那时候还没有多少人。我是第四个上车的,那时大约到九点了。我前面那个女学员不知是因为刹车太急还是转向灯没开的问题,被教练逮到机会一顿辱骂,说什么没带脑子,说了多少次还记不住,之后都是很难听的话。中间我曾想制止和反击教练,不过转念一想,我若是替她鸣不平,教练肯定会说跟我在骂她,跟你没关系什么的。于是,我决定等待。到我了,上车挂一档的时候,感觉这车的档位和上次开的车的档位手感不太一样,于是重挂了几次,又问教练是不是挂对了。教练这时开喷了,说你问什么,叫你不要问,听着就行了,接着又开始了他的习惯性辱骂。没等他说完,我就以两倍的音量回击他。他先是怔了一下,应该是没想到会有学员反驳他,接着跟我吵。不过明显语气减弱了许多,说什么这样是为你们好,让你们记住云云。同车的学员也都劝我,少说两句,教练也是为你好之类的。… Read the rest

Scalar Data

Numbers

All Numbers Have the Same Format Internally

Internally, Perl computes with double-precision floating- point values. This means that there are no integer values internal to Perl—an integer constant in the program is treated as the equivalent floating-point value. Examples:… Read the rest