I'm new at cPanel and am running it on Red Hat Enterprise 3 with Perl 5.8.4. I like to organize common subroutines that I use across more than one script into files that I import using perl's "do" command, e.g.:
do "common_subroutines.pm"; # (is in same directory)
For some reason it completely bombs out with a 500 error "premature end of script headers" which I interpret to mean that it isn't being allowed to read it. The subroutine file has chmod 666 and I've even tried 777 and to no avail. I've also tried doing an absolute path, i.e.
do "/home/username/public_html/cgi-bin/common_subroutines.pm";
Obviously I can roll these into the module library and do the "use" command but some of these I don't use for more than a few scripts so that seems like a lot of hassle, especially since I fiddle with them all the time. Anyone have any ideas?
Thanks,
~Roger
do "common_subroutines.pm"; # (is in same directory)
For some reason it completely bombs out with a 500 error "premature end of script headers" which I interpret to mean that it isn't being allowed to read it. The subroutine file has chmod 666 and I've even tried 777 and to no avail. I've also tried doing an absolute path, i.e.
do "/home/username/public_html/cgi-bin/common_subroutines.pm";
Obviously I can roll these into the module library and do the "use" command but some of these I don't use for more than a few scripts so that seems like a lot of hassle, especially since I fiddle with them all the time. Anyone have any ideas?
Thanks,
~Roger