$s = "this is an\b correct usage"; $s =~ s[.\cH][]g; print $s; this is a correct usage #### $s = "My first attempt was slightly\b\b\b\b\b\b\b\bvery buggy, maybe thus\b\bis better?"; $s =~ s[[^\cH]\cH][]g while 1+index $s, chr(8); print $s; My first attempt was very buggy, maybe this better?