Could it be you posted the very same question in the newsgroup <comp.lang.perl.misc>? It sure looks that way. So people interested in the replies should check out the replies in that thread as well. As usual, Benjamin Goldberg gave a pretty solid reply. Most important tip of all: do not unlock a file before closing it.