John wrote: > > The incoming e-mail form variables from my web page are vetted through > various tests before they're processed. The first thing I do is to translate > all "<, >, {, }, [, ]" characters to either "(" or ")", as appropriate. My > theory is that I don't want any HTML tags being taken in, and will gladly > suffer whatever small degradation which might occur to someone's prose style > as a consequence. <g> > > $user_body =~ tr/<->/(-)/; > $user_body =~ tr/{-}/(-)/; > $user_body =~ tr/[-]/(-)/;
You do realize that using a hyphen (-) in a character class creates a range of characters. tr/<->/(-)/ changes '<' to '(', '=' to '-' and '>' to ')'. tr/{-}/(-)/ changes '{' to '(', '|' to '-' and '}' to ')'. tr/[-]/(-)/ changes '[' to '(', '\' to '-' and ']' to ')'. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]