There are a few issues with the code you showed us. You are reading the file line by line, so you do not want to check for points and levels the way you are doing, and write two lines for each line you read. Also, the match pattern must be between the first two slashes. I'd advise you to read the documentation again.
Nevertheless, I wrote a small script that I believe will get you on the right path. The foreach loop will act like your while (<FILEREAD>){ by iterating on the array @strings "line by line".
use strict;
use warnings;
my @strings = (
'points: "_eglErdrm@}}vA|}vAihtB~}vAik{C|}vA}~mHnojBgzlBjy
+[aktAoeAooo@_l`@wl^y{oA",',
'levels: "PKLMOKNLP",'
);
foreach my $string (@strings) {
$string =~ s/(points|levels):(.*),$/$2/;
print $string."\n";;
}
# That outputs:
"_eglErdrm@}}vA|}vAihtB~}vAik{C|}vA}~mHnojBgzlBjy[aktAoeAooo@_l`@wl^y
+{oA"
"PKLMOKNLP"