Alex Jiang


Web, iOS, Design, Literature

Perl CheatSheet 5

List and Array

List

  • init. one element in list. $fred[0] = "do";
  • maximum element index: $index = $#fred
  • last value of list: $last = $fred[$#fred] or $last = $fred[-1]
  • out-of-bound subscripts return undef, print nothing
  • assigning beyond $#list, just stretches the list, filling the middle element with undefined. e.g. $fred[20] = hello, then $fred[1…19] is there, but undefined
Read more...

Perl Cheatsheet 1

Perl w1

  • a little thought on Perl
    • make sure you know the context when writing perl program
    • make sure you understand which type of var you are using
      • scalar always start with $
      • list always start with @
      • dict always start with %
Read more...

The dreams of yesterday are the hopes of today and the reality of tomorrow.

Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.

Read more...