Hi Al,
Seeing some code will help. In jIRCii scripts can see global variables belonging to other scripts. The main trick is to make sure the scriptVariables object is installed into MAIN_SCRIPT and INCLUDED_SCRIPT by calling setScriptVariables on the ScriptInstance.
Subroutines look at the local scope (on the stack), the closure scope (similar to static scope in C), and then the global scope from the script variables object associated with the current script instance.
If you're working with AtD, be aware that things get a little weird when you're working with fork(). fork() creates an isolated script environment and you have to explicitly copy values into it when you create the fork(). That's the scripter's responsibility in this case.
If you have script A:
global('$x');
$x = 42;
And script B:
sub foo {
println($x);
}
foo();
And they're sharing the same script variables, you'll get an output of 42. If you're pretty sure the vars are shared, post some code and I'll take a look at it.
-- Raphael
P.S. I assume you saw this, but section 9.2 of the Sleep Manual talks about this:
http://sleep.dashnine.org/manual/