This also might be a good modification-
my @out = split /\s*([[:punct:]])\s*/, $s;Depending on input and what the OP needs in the end. I think the POSIX classes, like punct, came in with 5.6. Someone will correct me if that's not right.
In reply to Re^2: splitting punctuation in a text
by Your Mother
in thread splitting punctuation in a text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |