use utf8; my $string = 'AÿþBÿþÿþC'; $string =~ s/ÿþ//g; print $string; #### ABC