in reply to Strip bad characters from a string

You want tr///, as in: $user_input =~ tr/"'\n//d; Be sure to use the /d at the end, as this tells the tr operator to Delete the characters specified.

s/// would also work, but it is quite a bit faster to use tr///.