Hi, I've got two programs, lets say "main.cgi" and "commons.pl". The "commons.pl" program contains all of the globably declared variables and subroutines that are used by all the other various programs, including "main.cgi".
In the commons file, I also have my "use" statements.
use Date::Calc qw( Decode_Date_US Add_Delta_Days);
use CGI::Carp 'fatalsToBrowser';
use CGI qw/:standard/;
$q = new CGI;
From the "main" program, I'm accessing this large group of subroutine and variable by using:
rest of program here...
Now, the problem is that I'm getting "Prototype mismatch: sub main::head ($) vs none at /usr/local/lib/perl5/5.00502/CGI.pm line 232." errors everytime I run the script.
I've tried to define the "commons" as a .pm and "use commons", but then I get errors like "Undefined subroutine CGI::"
So, the question is how do I create a package of common variables, arrays, hashes, and subroutines in one file that I can call either through require or use and have them available to all my other programs.
Filmo the Klown