string parsing in perl

I don't know perl at all but I need to parse a string and remove the white spaces out of it. How do I do it?

Say I have "UNIX OS/2 Windows MAC"
and I want to make it "UNIXOS/2WindowsMAC"

how do I do it? Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

$string =~ s/\s//g;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sorry guess I could have been a little more clear.  This will take the value of $string and replace a the white space characters for null (efectivly removing them) but it will perform the subtitution directly on $string.  If you want to preserve $string do this:

($new_string = $string) =~ s/\s//g;

This copies $string to $new_string and then does the substitution on $new_string, preserving $string.
Did that work?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.