$string=~s/ //g;
will do it if they're the only 's in the string
$string=~s/ / /g;
will just convert them spaces which you can trim
$string =~ s/\s+$//;
HTH
--Paul
It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ... smack the fecker