A couple of days ago someone (mjd?) was wondering if the problem that threads have with the regex match variables (where the regex variables are tied to pieces of the code and reflect the last thread that executed it) occurred with non-threaded code too. Just for chuckles, I decided to try it this afternoon and, as expected, the problem can be duplicated with a non-threaded perl build. Witness: $search_string = "123abc"; sub foo { $again = shift; $search_string =~ /(\d+)(\w+)/; print "$1 $2\n"; return unless $again; $search_string = "456def"; foo(0); print "$1 $2\n"; } foo(1); produces: 123 abc 456 def 456 def I don't recall seeing this documented anywhere, though it very well might be. Given that this is going to be fixed in one way or another for threaded perl, do we want to go all the way and fix it so non-threaded perl does lexical scoping for the match variables too? Dan ----------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk