in reply to RE: RE: RE: Localizing Filehandles
in thread Localizing Filehandles

Ah, yes, you are right... local acts on global variables. To paraphrase Sriram Srinivasan (Author of Advanced Perl Programming), local takes the value and stores it elsewhere until the end of the block when it restores the previous value. This would most definately cause a problem with any threaded design since the file handle is global - and available to all threads. I would guess that then that the only reason your script didn't core dump sooner was pure luck (or lack there of, really). Thanks for pointing this out.

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: Localizing Filehandles
by BlueLines (Hermit) on Jul 19, 2000 at 02:47 UTC
    pure luck it was. usually the first thread would complete a read/write cycle, and occasionaly the second thread would as well. However, the third and fourth threads were guaranteed to spill core. I have to say that this is the first time in 2 years i've managed to make a perl program dump core (took me 3 weeks in C ). That definitely says something about our chosen craft......

    BlueLines