Several ways to test your CGI scripts:
http://yourdomain.com/cgi-bin/script.pl
perl -c script.pl # Check syntax
perl script.pl # Run directly
use CGI::Carp qw(fatalsToBrowser);
fatalsToBrowser in production for security.