in reply to CGI::param wrapper for untainting
For what it's worth, I don't see anything non-functional about your code. Time to do some debugging.