Skip to content

Commit 2a91fc1

Browse files
trwyantkhwilliamson
authored andcommitted
Add "\" to characters that produce warnings in qw().
Perl 5.43.2 added diagnostic `Possible attempt to escape whitespace in qw() list`, which triggers on the detection of a reverse solidus. This commit rewrites the last paragraph in the section on `qw()` to add the reverse solidus to the list of characters that produce a warning.
1 parent 815d0d1 commit 2a91fc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pod/perlop.pod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,10 +2089,11 @@ Some frequently seen examples:
20892089
use POSIX qw( setlocale localeconv )
20902090
@EXPORT = qw( foo bar baz );
20912091

2092-
A common mistake is to try to separate the words with commas or to
2093-
put comments into a multi-line C<qw>-string. For this reason, the
2094-
S<C<use warnings>> pragma and the B<-w> switch (that is, the C<$^W> variable)
2095-
produces warnings if the I<STRING> contains the C<","> or the C<"#"> character.
2092+
Common mistakes are trying to separate the words with commas, trying to
2093+
put comments into a multi-line C<qw>-string, or trying to C<\>-escape
2094+
the space between words. For this reason, the S<C<use warnings>> pragma
2095+
and the B<-w> switch (that is, the C<$^W> variable) produce warnings if
2096+
the I<STRING> contains the C<",">, C<"#">, or C<"\"> characters.
20962097

20972098
=back
20982099

0 commit comments

Comments
 (0)