in reply to
CGI process exit not noticed by browser
Are you certain you know what value is in $sort? Also what is the point in assigning a value for $sortValue if the next step is only to exit (unless there's more to the script)?
So, first off double check that what is 'actually' contained in $cgi->param('sort') is what you think it is before trying to manipulate it.
Update:I didn't read the question properly after a second look and Aristotle is far more likely to be correct esp if you are using mod_perl and trying to exit... sorry :(