in reply to Stuck

Insert this line into your code after the #!/usr/bin/perl:

use CGI; use CGI::Carp 'fatalsToBrowser';
This will print the error messages into your browser window, and you can find out what the problem is.

-- tune