If the left and right delimiters aren't separated by "...",
then the DELIMITERS string must have an even number of characters. The first
half is treated as the opening delimiter and the second half as
the closing.

Operator names can be any sequence of Unicode characters. For example:

By default, all parameters are constant aliases to their corresponding
arguments -- the parameter is just another name for the original
argument, but the argument can't be modified through it. To allow
modification, use the is rw trait. To pass-by-copy, use the is
copy trait.

Parameters may be required or optional. They may be passed by position,
or by name. Individual parameters may confer a scalar or list context
on their corresponding arguments.

Arguments destined for required parameters must come before those bound
to optional parameters. Arguments destined for positional parameters
must come before those bound to named parameters.

Named parameters follow any required or optional parameters in the
signature. They are marked by a + before the parameter.

sub formalize($text, +$case, +$justify) {...}

Arguments that correspond to named parameters are evaluated in scalar
context. They can only be passed by name, so it doesn't matter what
order you pass them in, so long as they follow any positional arguments:

List parameters capture a variable length list of data. They're used
in subroutines like print, where the number of arguments needs to be
flexible. They're also called "variadic parameters," because they take a
variable number of arguments.

Variadic parameters follow any required or optional parameters. They are
marked by a * before the parameter:

sub duplicate($n, *@data, *%flag) {...}

Named variadic arguments are bound to the variadic hash (*%flag
in the above example). Such arguments are evaluated in scalar context.
Any remaining variadic arguments at the end of the argument list
are bound to the variadic array (*@data above) and are evaluated
in list context.

The unary prefix operator * flattens its operand (which allows the
elements of an array to be used as an argument list). The * operator
also causes its operand -- and any subsequent arguments in the argument
list -- to be evaluated in list context.

foo(1,2,3); # okay: three args found
foo(@onetothree); # error: only one arg
foo(*@onetothree); # okay: @onetothree flattened to three args

The * operator flattens lazily -- the array is only flattened if
flattening is actually required within the subroutine. To flatten before
the list is even passed into the subroutine, use the unary prefix **
operator:

The variadic array of a subroutine call can be passed in separately
from the normal argument list, by using either of the "pipe" operators:
<== or ==>.

Each operator expects to find a call to a variadic subroutine on its
"sharp" end, and a list of values on its "blunt" end:

grep { $_ % 2 } <== @data;

@data ==> grep { $_ % 2 };

First, it flattens the list of values on the blunt side. Then, it binds
that flattened list to the variadic parameter(s) of the subroutine on
the sharp side. So both of the calls above are equivalent to:

grep { $_ % 2 } *@data;

Leftward pipes are a convenient way of explicitly indicating the typical
right-to-left flow of data through a chain of operations:

@oddsquares = map { $_**2 } sort grep { $_ % 2 } @nums;

# more clearly written as...

@oddsquares = map { $_**2 } <== sort <== grep { $_ % 2 } <== @nums;

Rightward pipes are a convenient way of reversing the normal data flow in a
chain of operations, to make it read left-to-right:

@oddsquares =
@nums ==> grep { $_ % 2 } ==> sort ==> map { $_**2 };

If the operand on the sharp end of a pipe is not a call to a variadic
operation, then it must be a variable, in which case the list operand is
assigned to the variable. This special case allows for "pure" processing
chains:

A nonscalar type may be qualified, in order to specify what type of
value each of its elements stores:

my Egg $cup; # the value is an Egg
my Egg @carton; # each elem is an Egg
my Array of Egg @box; # each elem is an array of Eggs
my Array of Array of Egg @crate; # each elem is an array of arrays of Eggs
my Hash of Array of Recipe %book; # each value is a hash of arrays of Recipes

Each successive of makes the type on its right a parameter of the
type on its left. So:

my Hash of Array of Recipe %book;

means:

my Hash(returns=>Array(returns=>Recipe)) %book;

Because the actual variable can be hard to find when complex types are
specified, there is a postfix form as well:

temp invokes its argument's .TEMP method. The method is expected
to return a reference to a subroutine that can later restore the current
value of the object. At the end of the lexical scope in which the
temp was applied, the subroutine returned by the .TEMP method is
executed.

The default .TEMP method for variables simply creates
a closure that assigns the variable's pre-temp value
back to the variable.

New kinds of temporization can be created by writing storage classes with
their own .TEMP methods:

You can also modify the behaviour of temporized code structures, by
giving them a TEMP block. As with .TEMP methods, this block is
expected to return a closure, which will be executed at the end of
the temporizing scope to restore the subroutine to its pre-temp state:

Every subroutine has a .wrap method. This method expects a single
argument consisting of a block, closure or subroutine. That argument
must contain a call to the special call function:

sub thermo ($t) {...} # set temperature in Celsius, returns old temp

# Add a wrapper to convert from Fahrenheit...

$id = &thermo.wrap( { call( ($^t-32)/1.8 ) } );

The call to .wrap replaces the original subroutine with the closure
argument, and arranges that the closure's call to call invokes the
original (unwrapped) version of the subroutine. In other words, the call to
.wrap has more or less the same effect as: