my $str = "here are some words"; my $count = () = $str =~ /\S+/g;