my $text2 = "tldmfmyvkif4dwhbvysdrtaysdf"; my $out=join('', ($text2=~/([^y])/gc)[0..12]); print "$out\n";