create perl5131delta
[p5sagit/p5-mst-13.2.git] / pod / perlintro.pod
index 201ebea..c47274b 100644 (file)
@@ -63,7 +63,7 @@ Windows and Mac OS, read L<perlrun>.
 =head2 Safety net
 
 Perl by default is very forgiving. In order to make it more robust
-it is recommened to start every program with the following lines:
+it is recommended to start every program with the following lines:
 
     #!/usr/bin/perl
     use strict;
@@ -188,7 +188,7 @@ of elements in the array:
     if (@animals < 5) { ... }
 
 The elements we're getting from the array start with a C<$> because
-we're getting just a single value out of the array -- you ask for a scalar,
+we're getting just a single value out of the array; you ask for a scalar,
 you get a scalar.
 
 To get multiple values from an array:
@@ -302,15 +302,14 @@ are defined.
 Using C<my> in combination with a C<use strict;> at the top of
 your Perl scripts means that the interpreter will pick up certain common
 programming errors.  For instance, in the example above, the final
-C<print $b> would cause a compile-time error and prevent you from
+C<print $y> would cause a compile-time error and prevent you from
 running the program.  Using C<strict> is highly recommended.
 
 =head2 Conditional and looping constructs
 
-Perl has most of the usual conditional and looping constructs except for
-case/switch (but if you really want it, there is a Switch module in Perl
-5.8 and newer, and on CPAN. See the section on modules, below, for more
-information about modules and CPAN).
+Perl has most of the usual conditional and looping constructs.  As of Perl
+5.10, it even has a case/switch statement (spelled C<given>/C<when>).  See
+L<perlsyn/"Switch statements"> for more details.
 
 The conditions can be any Perl expression.  See the list of operators in
 the next section for information on comparison and boolean logic operators,
@@ -369,7 +368,7 @@ You can also use C<while> in a post-condition:
 
 Exactly like C:
 
-    for ($i=0; $i <= $max; $i++) {
+    for ($i = 0; $i <= $max; $i++) {
         ...
     }
 
@@ -443,7 +442,7 @@ before 99).
     !   not
 
 (C<and>, C<or> and C<not> aren't just in the above table as descriptions
-of the operators -- they're also supported as operators in their own
+of the operators. They're also supported as operators in their own
 right.  They're more readable than the C-style operators, but have
 different precedence to C<&&> and friends.  Check L<perlop> for more
 detail.)
@@ -537,7 +536,7 @@ expressions.  These are documented at great length in L<perlre>, but for
 the meantime, here's a quick cheat sheet:
 
     .                   a single character
-    \s                  a whitespace character (space, tab, newline)
+    \s                  a whitespace character (space, tab, newline, ...)
     \S                  non-whitespace character
     \d                  a digit (0-9)
     \D                  a non-digit
@@ -659,7 +658,7 @@ to database integration to graphics.  A categorized list of modules is
 also available from CPAN.
 
 To learn how to install modules you download from CPAN, read
-L<perlmodinstall>
+L<perlmodinstall>.
 
 To learn how to use a particular module, use C<perldoc I<Module::Name>>.
 Typically you will want to C<use I<Module::Name>>, which will then give