while () { # pick a random character to remove from the code fragment $b=$b[int rand @b]; last if $d =~ /\Q$b\E/ }