$str = 'aaaaa'; $str =~ s/a+/b/;