in reply to can i get a matched values as an array

Here I give the example,
@words = ($str =~ /(\w+)/g);
The array have a words from index 0. If it is three words, each word will be in each index from 0 to 2. I got this information from perlrequick. Further more information look into the man page.