http://www.perlmonks.org?node_id=1032569


in reply to Remove text within parenthesis

Or just a simple regex should work. What about this?
$s =~ s/(.*)\s(\(.*\))\s(.*)/$1 $3/g; print "matched $2\n"; print $s;