M
mike
i'm having trouble with variables
I have a main cgi script ... lets call it main.cgi
In main.cgi i have some other perl scripts that have subroutines
#!/usr/bin/perl -w
#
# name of this program is: main.cgi
#
use CGI;
use Cwd; #used to get the current working directory
$filebase = cwd;
#requires here
require "$filebase/some.lib";
require "$filebase/a.pl";
require "$filebase/b.pl";
require "$filebase/c.pl";
my $x = &do this;
So the question is:
1) if i dont use a subroutine that is in some.lib here in main.cgi but
in a.pl is it better to remove the require from main.cgi and put it in
a.pl?
2) can my require in main.cgi be global since the vars in some.lib are
used in a.pl, b.pl, and c.pl?
thanks 4 any help.
Mike
I have a main cgi script ... lets call it main.cgi
In main.cgi i have some other perl scripts that have subroutines
#!/usr/bin/perl -w
#
# name of this program is: main.cgi
#
use CGI;
use Cwd; #used to get the current working directory
$filebase = cwd;
#requires here
require "$filebase/some.lib";
require "$filebase/a.pl";
require "$filebase/b.pl";
require "$filebase/c.pl";
my $x = &do this;
So the question is:
1) if i dont use a subroutine that is in some.lib here in main.cgi but
in a.pl is it better to remove the require from main.cgi and put it in
a.pl?
2) can my require in main.cgi be global since the vars in some.lib are
used in a.pl, b.pl, and c.pl?
thanks 4 any help.
Mike