I'm sorry if this question has already been answered, but I couldn't find
the answer.
Here is my problem. I have a script that looks like this:
#!/usr/local/bin/perl -Tw
use strict;
use CGI;
my $q = new CGI;
my $var = $q->param("var");
$var =~ m/(.*)/; #just to don't get any tainted errors, don't use in public.
$var = $1;#just to don't get any tainted errors, don't use in public.
require "/Library/WebServer/mod_perl/$var.pl";
print "Content-Type: text/plain\n\n";
print "1\n" if $lang::varl eq $var;
print "$var\n";
print "$lang::varl\n";
And I have the script nl.pl:
#!/usr/bin/perl -wT
use strict;
$lang::varl = "nl";
And the last one, en.pl:
#!/usr/bin/perl -wT
use strict;
$lang::varl = "en";
So if I make a request a few times with &var=en and then switch to &var=nl
It sometimes happens that I get:
nl
en
So I don't get the 1 ($lang::varl and $var don't eq) and indeed the two
lines don't match ("en\nnl" or also sometimes "nl\nen") $var always has the
right value, the problem is that $lang::varl doesn't always have the right
value.
I am using Apache 1.3.33, mod_perl 1.29 and Mac OS X 10.4.1.
I hope someone could help me. Thank you very much!
Bram.
_________________________________________________________________
Direct antwoord op je vragen: gebruik MSN Messenger http://messenger.msn.nl/