if(my ($first, $second) = $source =~ /blah(this)blah(that)blah/){ print "$first $second\n"; }