open(my $fh, '>', $qfn) or die("Can't create \"$qfn\": $!\n"); say $fh length for split $motif, $string;