in reply to Substituting in the substitution!

Don't you just want something like s![/\s]!_!g; tr/[]//d;. Or am I missing something?