There's a million solutions to this problem, depending on what you're going to do afterwards - you may use split for example and put all words into an array or use a reg ex and just grab the first word ..
@allwords = split(' ', $yourscalar); <-- split at spaces
print $allwords[0]; <-- just the first word
($firstword) = ($yourscalar =~ m/(\w+)/); <-- match first word, capture it and put it into $firstword
Something like this...
|