Hi all, I'm wondering if it's possible to count the number of substitutions made by s///g? While one could count the matches by doing scalar(@array = m//g), I couldn't find an equivalent for the substitution operator. Is this possible, or do I have to make two runs through the string: one to count, one to substitute?
In reply to Count substitutions by s///g by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |