$points = s//(points)+.,/;
Your regular expression is empty which means it will match at the first character boundary which is the beginning of the string and will substitute that with the text string "(points)+.," so if the current line in $_ contains qq[levels: "PKLMOKNLP",\n] after the substitution it will contain qq[(points)+.,levels: "PKLMOKNLP",\n].
The substitution operator always returns either true (1) if the substitution succeeded or false ('') if the substitution failed and in your case the substitution will always succeed so $points will always be assigned the value 1.
In reply to Re: Regex question
by jwkrahn
in thread Regex question
by drewman08
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |