Realize that s/// actually modifies the string it's operating on. After the first iteration, there will be no spaces around commas left in $text.
Furthermore, you assign to $TestText, but you never actually use its value.
In reply to Re^2: Comparing Regular Expressions
by JavaFan
in thread Comparing Regular Expressions
by vitoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |