in reply to CGI post truncating string?

Have you tested your regular expressions/processing by slurping in the values from STDIN or a file? CGI.pm is pretty handy for this. It should help you pinpoint whether the problem is interaction between the server/CGI.pm or your processing code.