On Wed, 19 Nov 2003, Rafael Garcia-Suarez wrote: > Dan Sugalski wrote: > > Basically you're using a variable that can be affected by external things > > in a way that pretty much guarantees that external things will be > > happening. That it changes isn't much of a surprise. ($!/$^E may get > > modified by some signal handlers too, depending on what you do, so there's > > not even any guarantee that "$^E = 42; $^E++;" will end up with $^E set to > > 43. > > Using the Mac OS X equivalent of truss/strace might help to find out > why errno changes there. My bet would be that the print triggers an errno update, which strikes me as perfectly reasonable. A syscall could be the result there, and syscalls can twiddle errno if they want to. A bit excessive if nothing goes wrong, perhaps, but not out of order. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunkThread Previous | Thread Next