$string =~ m/([\Q[]{},\E])/ or return; my($pos, $first) = ($+[0], $1);