Skip to content

Commit 5a9c3bf

Browse files
author
Zefram
committed
document qw's whitespace rules
qw only splits on ASCII whitespace, like primary tokenisation, but nowadays unlike the split() formulation with which it's documented. Document this additional difference from split(). Fixes [perl #132272].
1 parent 5ffd609 commit 5a9c3bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pod/perlop.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,8 @@ equivalent to:
23462346

23472347
split(" ", q/STRING/);
23482348

2349-
the differences being that it generates a real list at compile time, and
2349+
the differences being that it only splits on ASCII whitespace,
2350+
generates a real list at compile time, and
23502351
in scalar context it returns the last element in the list. So
23512352
this expression:
23522353

0 commit comments

Comments
 (0)