> #****************************************** > use strict; > package mypack; > > my $tmp; > $tmp .= 'a'; > print '$tmp value: ' . $tmp . ' - address: ' . \$tmp . "\n"; > #****************************************** > > I am running this script in a ModPerl::Registry environment. > > In this situation, the first time I'm running the script, I can see this: > > main $tmp: a - address: SCALAR(0xd725e0) > > And then, in subsequent calls: > > $tmp value: a - address: SCALAR(0xd77bf4) > $tmp value: a - address: SCALAR(0xd77d20) > $tmp value: a - address: SCALAR(0xd77d38) >
Could it be that the request is being answered by different threads, each one with their own copy of the $tmp variable? Try restricting apache to using only a single thread, and repeat the test. Clint