in reply to 500 internal server error !!

Okay, lets step back a step.

First, does your code run when it's not on a web server? You need to find out if it even compiles first.

Second, did you upload it in binary or ascii mode? If you uploaded from a Windows box to a unix box in binary mode, you'll get that error.

Third, read the error logs as mentioned above.

Fourth, use CGI::Carp with special attention to 'fatalsToBrowser'

Once you have done all of these things, come back with your error in hand.