This is driving me nuts.  This code works the first few exectutions, but
then doesn't after a while.  It's pretty simple, it should print out:

Name = value1
Name = value2

then after a few reloads it prints:

Name = value1
Name = value1

I'm sure it's something stupid, but my brain is apparently fried.



package Apache::local;

use strict;
use Apache::Constants qw(:common);
use CGI;

sub handler {

my %variable = ();
$| = 1;
$variable{'name'} = "value1";
my $r = shift;
$r->content_type('text/html');
$r->send_http_header;

print "Name = " . $variable{'name'} . "<BR>";
change_var();
print "Name = " . $variable{'name'} . "<BR>";
return OK;

sub change_var {
    $variable{'name'} = "value2";
}

}
1;

Thanks in adavance.

--
Aaron Turner, Core Developer       http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization  http://linuxkb.org/
Because world domination requires quality open documentation.
aka: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]

Reply via email to