Text::Balanced does it properly even if there is some funny stuff between the brackets. Look into the documentation for more info. But of course you can also use some regex to remove the strings in a simple way.
pelagic
Comment on Re^3: How to remove HTML tags from text