I once wrote one of these before for @NegativeMjark but I think I lost it. So here's another.
All you need to know is:
$foo
is a scalar (i.e. a single dimensional variable)@foo
is an array.$foo[n]
is the element of an array.%foo
is a hash.$foo{'moo'}
aka$foo{moo}
is the value in the hash for key'foo'
.\
is the reference operator. it returns a scalar which points to the address of the variable (like&
in C).(1, 2, 3)
is a list. (an array is a variable which contains a list).[1, 2, 3]
(rarely:\(1,2,3)
) is a reference to a list - aka arrayref$foo->[n]
gives an element of an arrayref