Skip to content

Commit 79c3307

Browse files
committed
Addressed more tech review comments.
1 parent 8793ad5 commit 79c3307

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

sections/expressivity.pod

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,19 @@ will understand and adopt more powerful idioms and techniques. It's okay for
6464
you to write simple code that you understand. Keep practicing and you'll become
6565
a native speaker.
6666

67-
An experienced Perl hacker might triple a list of numbers with:
67+
A novice Perl hacker might triple a list of numbers with:
6868

6969
=begin programlisting
7070

71-
my @tripled = map { $_ * 3 } @numbers;
71+
my @tripled;
72+
73+
for (my $i = 0; $i < scalar @numbers; $i++) {
74+
$tripled[$i] = $numbers[$i] * 3;
75+
}
7276

7377
=end programlisting
7478

79+
7580
... and a Perl adept might write:
7681

7782
=begin programlisting
@@ -84,15 +89,11 @@ An experienced Perl hacker might triple a list of numbers with:
8489

8590
=end programlisting
8691

87-
... while a novice might try:
92+
... while an experienced Perl hacker could write:
8893

8994
=begin programlisting
9095

91-
my @tripled;
92-
93-
for (my $i = 0; $i < scalar @numbers; $i++) {
94-
$tripled[$i] = $numbers[$i] * 3;
95-
}
96+
my @tripled = map { $_ * 3 } @numbers;
9697

9798
=end programlisting
9899

sections/next_steps.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The CPAN has plenty of other gems, though. For example, if you want to:
2626

2727
=item * I<Use a powerful web framework>, use C<Mojolicious>, C<Dancer>, or C<Catalyst>
2828

29-
=item * I<Process structured data files>, use C<Text::CSV>
29+
=item * I<Process structured data files>, use C<Text::CSV_XS> (or C<Text::CSV>)
3030

3131
=item * I<Manage module installations for applications>, use C<Carton>
3232

sections/perldoc.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ process id. Depending on your shell, you may have to quote the variable
8888
appropriately.
8989

9090
The C<-l> option shows the I<path> to the file containing the documentation. (A
91-
module may have a separate F<.pod> file in addition to its F<.pm> file.>)
91+
module may have a separate F<.pod> file in addition to its F<.pm> file.)
9292

9393
The C<-m> option displays the entire I<contents> of the module, code and all,
9494
without any special formatting.

sections/regular_expressions.pod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,17 @@ The C<\d> metacharacter matches Unicode digits:
433433

434434
=begin programlisting
435435

436-
# use Regexp::English for a robust phone number regex
437436
next unless $number =~ /B<\d>{3}-B<\d>{3}-B<\d>{4}/;
438437
say "I have your number: $number";
439438

440439
=end programlisting
441440

441+
C<Regexp::English>
442+
C<CPAN; C<Regexp::English>>
443+
444+
... though in this case, the C<Regexp::English> module has a much better phone
445+
number regex already written for you.
446+
442447
X<regex; C<\s>>
443448
X<C<\s>; whitespace regex metacharacter>
444449
X<regex; whitespace>

0 commit comments

Comments
 (0)