Tim:
Good questions:
1) Rule 1 -> ALWAYS USE "USE STRICT!" Trying to access global variables in
a mod_perl/ASP environment will kill you at the most inopportune time.
ONLY PASS VARIABLES VIA THE ARGUMENT LIST. DO NOT DEPEND ON GLOBAL
VARIABLES! ALWAYS USE "my"
2) Here is an example:
main.asp:
---------
<h1>Header 1</h1>
<%
my $MyLocalVar = "happy days!";
$Response->Include("myfile.inc", $MyLocalVar);
%>
<%
# now, pass an anonymous array
$Response->Include("myfile.inc", [$var1,$var2,$var3]);
# now, pass a scalar, anonymous array, and anonymous hash. (Now I'm being a
smart ass.)
$Response->Include("myfile.inc",
($MyLocalVar,[$var1,$var2,$var3],[my1=>'hello',my2=>'world']) );
%>
...
myfile.inc:
-----------
<%
my ($arg1,$arg2,$arg3) = @_; # arguments enter the ASP include file in "@_"
if (scalar $arg1){
}elsif (ref $arg1){
} else {
}
#or
if (@_ == 1) { #if the number of arguments is 1,
}elsif (@_ == 2) { # etc...
}
# from the "myfile.inc" I also have access to all the other global objects
including $Response, $Request,
# $Server, $Session, and $Application.
%>
JL
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]