in reply to Substitution on a sequence

my $data =">DL;H1_ENSP00000194530_chr2_202024 CCCC---GCCTTCTCGCTGCCCAG +C--CCCGGGGAGGGAGG*"; $data =~ s/[-*]|DL;//g; # globaly, replace all "-" or "*" OR "DL;" wi +th nothing # ignores possibility "DL;" appears elsewhere + in data # if that's an issue, you might want to do tw +o substitutions # $data =~ s/[-*]//g; and $data =~ s/(>)DL;/ +$1/g; # though that last is NOT tied to the beginni +ng of the line # which appears to be subject to brain_block +at the moment print $data; =head OUTPUT perl dataclean.pl >H1_ENSP00000194530_chr2_202024 CCCCGCCTTCTCGCTGCCCAGCCCCGGGGAGGGAGG =cut