#perl $foo .= $bar; #### #python foo.append(bar); #### # perl $foo =~ s/\W//g; #### #python import re foo = re.sub(foo,'\W','')