$_ = 'foo\bar(baz)'; print "Before: '$_'; "; s/[\(\)]//g; print "After: '$_'\n"; __END__ Before: 'foo\bar(baz)'; After: 'foo\barbaz'