Change 21283: Perlfaq nits from Iain Truskett.

[email protected] (Rafael Garcia-Suarez)
Newsgroups perl.perlfaq.workers,perl.perl5.changes
Message-ID <[email protected]>
Change 21283 by rgs@rgs-home on 2003/09/18 21:29:23

	Perlfaq nits from Iain Truskett.
	(from the perlfaq-workers list)

Affected files ...

... //depot/perl/pod/perlfaq2.pod#65 edit
... //depot/perl/pod/perlfaq4.pod#87 edit
... //depot/perl/pod/perlfaq8.pod#40 edit

Differences ...

==== //depot/perl/pod/perlfaq2.pod#65 (text) ====
Index: perl/pod/perlfaq2.pod
--- perl/pod/perlfaq2.pod#64~20514~	Tue Aug  5 22:22:29 2003
+++ perl/pod/perlfaq2.pod	Thu Sep 18 14:29:23 2003
@@ -69,7 +69,7 @@
 One simple way to check that things are in the right place is to print out
 the hard-coded @INC that perl looks through for libraries:
 
-    % perl -e 'print join("\n",@INC)'
+    % perl -le 'print for @INC'
 
 If this command lists any paths that don't exist on your system, then you
 may need to move the appropriate libraries to these locations, or create

==== //depot/perl/pod/perlfaq4.pod#87 (text) ====
Index: perl/pod/perlfaq4.pod
--- perl/pod/perlfaq4.pod#86~21204~	Fri Sep 12 23:47:23 2003
+++ perl/pod/perlfaq4.pod	Thu Sep 18 14:29:23 2003
@@ -2003,13 +2003,17 @@
    if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)
 			{ print "a C float\n" }
 
-You can also use the L<Data::Types|Data::Types> module on
-the CPAN, which exports functions that validate data types
-using these and other regular expressions, or you can use
-the C<Regexp::Common> module from CPAN which has regular
-expressions to match various types of numbers.
+There are also some commonly used modules for the task.
+L<Scalar::Util> (distributed with 5.8) provides access to perl's
+internal function C<looks_like_number> for determining
+whether a variable looks like a number.  L<Data::Types>
+exports functions that validate data types using both the
+above and other regular expressions. Thirdly, there is
+C<Regexp::Common> which has regular expressions to match
+various types of numbers. Those three modules are available
+from the CPAN.
 
-If you're on a POSIX system, Perl's supports the C<POSIX::strtod>
+If you're on a POSIX system, Perl supports the C<POSIX::strtod>
 function.  Its semantics are somewhat cumbersome, so here's a C<getnum>
 wrapper function for more convenient access.  This function takes
 a string and returns the number it found, or C<undef> for input that
@@ -2032,7 +2036,7 @@
 
     sub is_numeric { defined getnum($_[0]) }
 
-Or you could check out the L<String::Scanf|String::Scanf> module on the CPAN
+Or you could check out the L<String::Scanf> module on the CPAN
 instead. The POSIX module (part of the standard Perl distribution) provides
 the C<strtod> and C<strtol> for converting strings to double and longs,
 respectively.

==== //depot/perl/pod/perlfaq8.pod#40 (text) ====
Index: perl/pod/perlfaq8.pod
--- perl/pod/perlfaq8.pod#39~20573~	Sat Aug  9 00:09:07 2003
+++ perl/pod/perlfaq8.pod	Thu Sep 18 14:29:23 2003
@@ -1163,7 +1163,7 @@
     use lib "$FindBin::Bin";
     use your_own_modules;
 
-=head2 How do I add a directory to my include path at runtime?
+=head2 How do I add a directory to my include path (@INC) at runtime?
 
 Here are the suggested ways of modifying your include path:
 
End of Patch.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.