Skip to content

Commit

Permalink
add comment about »
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jul 12, 2010
1 parent 71c68c8 commit 0b4cfd7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/basics.pod
Expand Up @@ -88,10 +88,12 @@ a semicolon or a curly bracket at the end of a line:

X<lexical>
X<variables; lexical>
X<block>

C<my> declares a lexical variable. Lexical variables are visible only in
the current block. If there's no enclosing block, it's visible throughout the
remainder of the file.
remainder of the file. A block is any part of the code enclosed between curly
braces { }.

X<sigil>
X<identifier>
Expand Down Expand Up @@ -137,7 +139,7 @@ X<array>
X<method>
X<invocant>

The right-hand side calls a I<method>--a named group of behavior--named C<get>
The right-hand side calls a I<method> --a named group of behavior-- named C<get>
on the file handle stored in C<$file>. This method reads and returns one line
from the file, removing the line ending. C<split> is also a method, called on
the string returned from C<get>. C<split>'s single argument is a string
Expand Down
8 changes: 8 additions & 0 deletions src/operators.pod
Expand Up @@ -141,6 +141,14 @@ C<@variable.method> calls a method on the C<@variable>, C<@array».method>
calls a method for each item in C<@array>, and returns the list of the return
values.

» is called a I<hyper operator>. It is a unicode character that
can be entered on most computers
N<Ubuntu 10.4: In System/Preferences/Keyboard/Layouts/Options/Compose Key position
select on of the keys to be the "Compose" key. Then press
Compose-key and the "greater than" key twice.>
If your operating system does not make it easy to write it you can also write it as
>>.

So C<@scores».key> is a list of all the keys of the pair objects in C<@scores>,
and C<@scores».key».chars> is a list of the length of all keys in C<@scores>.

Expand Down

0 comments on commit 0b4cfd7

Please sign in to comment.