in reply to It seems simple...

by this you mean: "ab&^#c( 1 2"=>"abc12"? if so try $string=~s/\W//g; not sure what you meant, the $var!~s///g syntax seems weird to me.