in reply to CGI - hazardous characters

It all depends on what your definition of "special characters" is. Punctuation? There's some regex examples here. Since you're working with CGI, then I'd recommend WWW::Form.