my $matched = ( $q ^ substr( $t, 0, length( $q ) ) ) =~ tr[\0] +[\0]; if( $matched >= ( length( $q ) -1 ) )