I have a cgi script similar to the following:
BEGIN {
unshift (@INC, "$ENV{'HOME'}/www/cgi-bin/SiteSpecific");
}
print "Content-type: text/html\n\n";
use SiteObject;
my $siteObjInst = SiteObject->instance();
print $siteObjInst->{HideFields};
This would run fine from the command prompt, but fails when run as a CGI script from a browser. The $ENV{'HOME'} is perhaps not set as the script cannot find the module.
Is it that the CGI scripts are not run within a shell and do not find the environment variables?
If the above is true, do I need to set the desired variables within the BEGIN block using some other means?
Thanks for your help.