Ugghhh! $++ doesn't do what you think. You think $| == 0 and that $|++ makes $|==1. Sure IFF $|==0. But what when some other fool does $|++. Then your $|++ doesn't do anything. Even worse $|-- doesns't set $|==0, because you blindly did $++. Now maybe your think this turns it into some sort of recursive lock type thing. No! because someone could have done $|=0 or $|=1 in another part or the code, cuz it's is the RightThing(tm).