If this is the exact code you used on your server, then the error is because
if ($url=~list$r=1)
is not valid Perl code. Help for such stuff can be found
in many a way :
Have a look at /ver/log/httpd/errors.log or whatever your httpd logfiles are called