Thanks for the link. I actually don't use functions.
Everything is mostly in MAIN. Here is a snip of code:
#!/usr/bin/perl -wT
use strict;
print "<body>";
my $r = Apache->request;
$r->content_type("text/html");
$r->status(200);
my $auth_type = $r->auth_type;
$cookie=$auth_type->key;
($user,$hash)=split(/:/,$cookie);
read(STDIN, my $buffer, $ENV{'CONTENT_LENGTH'});
my @pairs = split(/&/, $buffer);
foreach my $pair (@pairs) {
....
}
What I am doing wrong? Everytime the script runs the
values of the variables coming in change. Should I
use the delete function and delete all of the
variables at the end of the script? @pairs is what
should change, but sometimes does not. I have tried
to add a undef @pairs before the split, but no luck.
Mike
--- Perrin Harkins <[EMAIL PROTECTED]> wrote:
> Michael Drons wrote:
> > I am using Apache::Registry (Apache 1.3.26) I am
> see
> > weird things happen with my scripts. I have have
> "use
> > strict" in all of the scripts and I use my() for
> all
> > of my variables. But I still have variables that
> > contain data from previous loads.
>
> Sounds like the closure problem with subroutines in
> Apache::Registry.
> Does you code have subroutines that refer to
> variables declared outside
> of them?
>
> > Everything I can find in docs says read the FAQ at
>
> > http://perl.apache.org/faq/, which does not
> exists.
>
> Read this:
>
http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my___Scoped_Variable_in_Nested_Subroutines
>
> - Perrin
>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com