$str ='abcd'; $str =~s/a//g; # \g unnecessary ## $str = 'abacad'; $str =~s/a//g; # more appropriate