in reply to removing 2 blanks from a string

$string =~ s/\s{2,}/ /g; # the space in your replacement is missing