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