Well, before you even try to run things through httpd/cgi-bin, you should be sure that your file is actually working correctly. The web server does nothing but execute the script, just like you can from the command line.
Try running this simple script instead, first (adjust shebang accordingly):
Code:
#!/usr/bin/perl
use strict;
$|=1;
print "Content-Type: text/plain\n\n";
print "Environment variables:\n";
foreach (keys(%ENV)){
print "\$ENV{'".$_."'} == ".$ENV{$_}."\n";
}
Once you get this to run on the command-line and through cgi-bin, you know your setup is working.