M
Monday
Hello, I am new to Perl. I want to do something simple but seem to be
unable to do this. I want to call a subroutine and have it access the
global variables in the caller program, similar to below where
index.cgi is the calling program and called.cgi is the called program.
How do I do this since there is no 'include' type of statement in
Perl? -Monday
index.cgi
=========
#!c:/perl/bin/perl.exe
our $globalVar = "Chicago";
callNow();
return 1;
called.cgi
==========
callNow() {
print "global variable is $globalVar";
}
unable to do this. I want to call a subroutine and have it access the
global variables in the caller program, similar to below where
index.cgi is the calling program and called.cgi is the called program.
How do I do this since there is no 'include' type of statement in
Perl? -Monday
index.cgi
=========
#!c:/perl/bin/perl.exe
our $globalVar = "Chicago";
callNow();
return 1;
called.cgi
==========
callNow() {
print "global variable is $globalVar";
}