Both the script file and the directory in which it resides must be chmod 755 (or at least executable but not writable).
In addition you'll need to learn how to develop debugging code for CGI scripts. A quick and easy way is to include:
use CGI::Carp qw(fatalsToBrowser);
So that most errors like parsing errors will be displayed in a web page instead of getting the generic 500 message. Just remember to take it out for production code.
[color=#6600CC]Atropos[/color] | openvein.org