my @matched = $str =~ /\ba\w+\b/g; #### my $matched = join ' ', $str =~ /\ba\w+\b/g;