$str = "this is a string"; print scalar split(/\s/,$str);