my($first, $second, $third) = $text =~ /(\([a-z]*\))(?:\s|_|$)/gi; print "$first and $second and $third\n";