So this post is in two parts: 

I have found a few different ways of either removing whitespace at the beginning & end of a string or sending out an error if there is any whitespace - but how can I remove all whitespace in a string ($name)? < By this if someone enters their full name with spaces the script should automatically put their first and last name together without the whitespace without putting out error. 

Also, how can I make sure a @ sign is a default at the beginning of the string like the twitter username?