Front page | perl.perl5.porters |
Postings from February 2003
[PATCH] pod/perlfunc.pod
Thread Next
From:
abigail
Date:
February 2, 2003 08:00
Subject:
[PATCH] pod/perlfunc.pod
Message ID:
20030202155948.7971.qmail@abigail.nl
I noticed that the C<split(' ', $_)> got a line-break at the space
in the pattern. Surrounding it with S<> makes sure the syntax doesn't
get lost.
Abigail
--- pod/perlfunc.pod.orig Sun Feb 2 16:51:47 2003
+++ pod/perlfunc.pod Sun Feb 2 16:57:40 2003
@@ -4812,13 +4812,13 @@
patterns that vary at runtime. (To do runtime compilation only once,
use C</$variable/o>.)
-As a special case, specifying a PATTERN of space (C<' '>) will split on
-white space just as C<split> with no arguments does. Thus, C<split(' ')> can
-be used to emulate B<awk>'s default behavior, whereas C<split(/ /)>
+As a special case, specifying a PATTERN of space (S<C<' '>>) will split on
+white space just as C<split> with no arguments does. Thus, S<C<split(' ')>> can
+be used to emulate B<awk>'s default behavior, whereas S<C<split(/ /)>>
will give you as many null initial fields as there are leading spaces.
-A C<split> on C</\s+/> is like a C<split(' ')> except that any leading
+A C<split> on C</\s+/> is like a S<C<split(' ')>> except that any leading
whitespace produces a null first field. A C<split> with no arguments
-really does a C<split(' ', $_)> internally.
+really does a S<C<split(' ', $_)>> internally.
A PATTERN of C</^/> is treated as if it were C</^/m>, since it isn't
much use otherwise.
Thread Next
-
[PATCH] pod/perlfunc.pod
by abigail