Well I am sure there can be many different levels of issues here, but first I would suggest checking that the script is executable this file should be chmod 755. Also you might need to ensure your Apache build was configured with suexec enabled.
SUNADMN USE PERL
Re: How to configure Apache for running perl scripts.
Replies are listed 'Best First'.