substr( $mask_input, $lastEnd, $start ) =~ tr//N/c;