and will merrily dump out nested references, complete objects, partial objects
- just about whatever you throw at it:
-Let's make a quick object and x-plode it, first we'll start the the debugger:
+Let's make a quick object and x-plode it, first we'll start the debugger:
it wants some form of input from STDIN, so we give it something non-commital,
a zero:
=item Number too long
(F) Perl limits the representation of decimal numbers in programs to
-about about 250 characters. You've exceeded that length. Future
+about 250 characters. You've exceeded that length. Future
versions of Perl are likely to eliminate this arbitrary limitation. In
the meantime, try using scientific notation (e.g. "1e6" instead of
"1_000_000").
of a Unix shell with the power of Perl. The goal is to eventually
have a full featured shell that behaves as expected for normal
shell activity. But, the Perl Shell will use Perl syntax and
- functionality for for control-flow statements and other things.
+ functionality for control-flow statements and other things.
The Shell.pm module (distributed with Perl) makes Perl try commands
which aren't part of the Perl language as shell commands. perlsh
Perl provides the function C<sv_chop> to efficiently remove characters
from the beginning of a string; you give it an SV and a pointer to
-somewhere inside the the PV, and it discards everything before the
+somewhere inside the PV, and it discards everything before the
pointer. The efficiency comes by means of a little hack: instead of
actually removing the characters, C<sv_chop> sets the flag C<OOK>
(offset OK) to signal to other functions that the offset hack is in
}
The C style for loop is rarely needed in Perl since Perl provides
-the the more friendly list scanning C<foreach> loop.
+the more friendly list scanning C<foreach> loop.
=item foreach
=back
A layer does not have to implement all the functions, but the whole table has
-to be present. Unimplemented slots can be NULL (which will will result in an error
+to be present. Unimplemented slots can be NULL (which will result in an error
when called) or can be filled in with stubs to "inherit" behaviour from
a "base class". This "inheritance" is fixed for all instances of the layer,
but as the layer chooses which stubs to populate the table, limited
Extension modules are written in C (or a mix of Perl and C). They
are usually dynamically loaded into Perl if and when you need them,
-but may also be be linked in statically. Supported extension modules
+but may also be linked in statically. Supported extension modules
include Socket, Fcntl, and POSIX.
Many popular C extension modules do not come bundled (at least, not
The level of detail in Perl module documentation generally goes from
less detailed to more detailed. Your SYNOPSIS section should contain a
minimal example of use (perhaps as little as one line of code; skip the
-unusual use cases or or anything not needed by most users); the
+unusual use cases or anything not needed by most users); the
DESCRIPTION should describe your module in broad terms, generally in
just a few paragraphs; more detail of the module's routines or methods,
lengthy code examples, or other in-depth material should be given in
Throughout this document, "Pod" has been the preferred spelling for
the name of the documentation format. One may also use "POD" or
-"pod". For the the documentation that is (typically) in the Pod
+"pod". For the documentation that is (typically) in the Pod
format, you may use "pod", or "Pod", or "POD". Understanding these
distinctions is useful; but obsessing over how to spell them, usually
is not.
=head2 Matching this or that
-We can match match different character strings with the B<alternation>
+We can match different character strings with the B<alternation>
metacharacter C<'|'>. To match C<dog> or C<cat>, we form the regex
C<dog|cat>. As before, perl will try to match the regex at the
earliest possible point in the string. At each character position,
-perl will first try to match the the first alternative, C<dog>. If
+perl will first try to match the first alternative, C<dog>. If
C<dog> doesn't match, perl will then try the next alternative, C<cat>.
If C<cat> doesn't match either, then the match fails and perl moves to
the next position in the string. Some examples:
/[yY][eE][sS]/; # match 'yes' in a case-insensitive way
# 'yes', 'Yes', 'YES', etc.
-This regexp displays a common task: perform a a case-insensitive
+This regexp displays a common task: perform a case-insensitive
match. Perl provides away of avoiding all those brackets by simply
appending an C<'i'> to the end of the match. Then C</[yY][eE][sS]/;>
can be rewritten as C</yes/i;>. The C<'i'> stands for
regexp. For instance, suppose we want to search for housecats or
housekeepers. The regexp C<housecat|housekeeper> fits the bill, but is
inefficient because we had to type C<house> twice. It would be nice to
-have parts of the regexp be constant, like C<house>, and and some
+have parts of the regexp be constant, like C<house>, and some
parts have alternatives, like C<cat|keeper>.
The B<grouping> metacharacters C<()> solve this problem. Grouping
position of the string 'a'. If there were no matches at the first
position, perl would move to the second character position 'b' and
attempt the match all over again. Only when all possible paths at all
-possible character positions have been exhausted does perl give give
+possible character positions have been exhausted does perl give
up and declare S<C<$string =~ /(abd|abc)(df|d|de)/;> > to be false.
Even with all this work, regexp matching happens remarkably fast. To
"dogbert =~ //; # this matches the 'd' regexp used before
The final two modifiers C<//g> and C<//c> concern multiple matches.
-The modifier C<//g> stands for global matching and allows the the
+The modifier C<//g> stands for global matching and allows the
matching operator to match within a string as many times as possible.
In scalar context, successive invocations against a string will have
`C<//g> jump from match to match, keeping track of position in the
matching regular expressions is analogous to a walk in the woods, then
the tools discussed in Part 1 are analogous to topo maps and a
compass, basic tools we use all the time. Most of the tools in part 2
-are are analogous to flare guns and satellite phones. They aren't used
+are analogous to flare guns and satellite phones. They aren't used
too often on a hike, but when we are stuck, they can be invaluable.
What follows are the more advanced, less used, or sometimes esoteric
atop it, as in the word Angstrom. C<\X> is equivalent to C<\PM\pM*}>,
i.e., a non-mark followed by one or more marks.
-For the the full and latest information about Unicode see the latest
+For the full and latest information about Unicode see the latest
Unicode standard, or the Unicode Consortium's website http://www.unicode.org/
As if all those classes weren't enough, Perl also defines POSIX style
The independent subexpression C<< (?>a*) >> doesn't care about the rest
of the regexp, so it sees an C<a> and grabs it. Then the rest of the
regexp C<ab> cannot match. Because C<< (?>a*) >> is independent, there
-is no backtracking and and the independent subexpression does not give
+is no backtracking and the independent subexpression does not give
up its C<a>. Thus the match of the regexp as a whole fails. A similar
behavior occurs with completely independent regexps:
Normally, regexps are a part of Perl expressions.
S<B<Code evaluation> > expressions turn that around by allowing
-arbitrary Perl code to be a part of of a regexp. A code evaluation
+arbitrary Perl code to be a part of a regexp. A code evaluation
expression is denoted C<(?{code})>, with C<code> a string of Perl
statements.
=item Encoding Names
The MIME name as defined in IETF RFC-XXXX, The name in the IANA registry,
-The name used by the the organization that defined it
+The name used by the organization that defined it
=back
=head2 Cross compilation
Make Perl buildable with a cross-compiler. This will play havoc with
-Configure, which needs to how how the target system will respond to
+Configure, which needs to know how the target system will respond to
its tests; maybe C<microperl> will be a good starting point here.
(Indeed, Bart Schuller reports that he compiled up C<microperl> for
the Agenda PDA and it works fine.) A really big spanner in the works
cast an AV* or an HV* to type SV* in this case (and many others). This
allows you to take references to arrays, hashes and scalars with the same
function. Conversely, the C<SvRV> function always returns an SV*, which may
-need to be be cast to the appropriate type if it is something other than a
+need to be cast to the appropriate type if it is something other than a
scalar (check with C<SvTYPE>).
=item *