in reply to Tidying up punctuation in a CGI text area

Use the tr/// operator, e.g.
$textarea =~ tr/ ,;//d;

Replies are listed 'Best First'.
Re^2: Tidying up punctuation in a CGI text area
by Zcity (Novice) on Jul 05, 2006 at 19:28 UTC
    the tr/// works when i'm doing the print html but when im posting the text in the log file, it doesnt delete the line spaces. Any other solutions?

      That tr doesn't include new lines at all. The only reason you see it working in the HTML is because HTML always ignores newlines.


      ___________
      Eric Hodges