You might not mean to say that there is a bug in Perl, but you are saying it!
What you're asking boils down to, "I want Perl to work as documented." Well Perl does. So the problem isn't there - it is somewhere else in your code.
As for figuring your code out, I strongly advise that you get in the habit of writing little snippets to test theories like this. Because right now you're staring at a mass of code and you are coming up with a theory. You aren't testing that theory, or verifying it, you are coming up with it and then posting for help based on your theory. But your theory is wrong. Nobody can provide you with help based on your theory, because you haven't actually identified your problem!
This isn't an effective debugging strategy. It is a very common one that people naturally fall into. It takes a lot of experience and patience to avoid this trap (been there, done that - we all have). And you won't progress until you start doing something more effective.
So sitting where I am, all that I can do is tell you that the problem isn't what you think it is. You'll have to look elsewhere. I told you a couple of other places to look. But without your code I can't do more than guess either. (Again, not very effective. But at least my guesses are based on a lot of experience about what can go wrong, so I'll come up with theories that are possible, if not likely.) |