in reply to When is my variable not really mine?

The behavior that you describe is bizarre, so it's difficult to imagine. Try reducing the code to a minimal test case so you can isolate the error. I recently had a problem where I thought my was not localizing a variable properly and I assumed that I had a bug. As it turns out, I had a typo which several other programmers missed, but reducing to a minimal test case (I was going to post it here if I could replicate it) revealed my problem.

If you're curious, here's what happened with me: At the top of my program, I had

my @data;
In one of my subs, I forgot parens around a set of variables I was declaring:
my @stuff, @data;
Guess what? I didn't localize @data (had I been more creative with my variable names, strict would have caught this). It took me quite a while to spot that. I thought I had a genuine bug in DBI uncovered.

Remember, get a minimal test case and if you still have it, post the code and we'll get to work :)

Cheers,
Ovid

On a side note: I always think I've found a problem in Perl, or DBI, or CGI, only to discover that the problem is my code. In a year of doing Perl, I've only encountered one actual bug in Perl. I'll be good money that the issue is your code.