I tested using a tied array (to file) with what you mentioned. I was locking a shared variable before adding anything to the array and I would lock the same variable before a read. The problem I encountered (and I hope I am wrong) is that Tie::File module seemed to be leaky (memory wise), and before I knew it, my overall script was taking a lot of memory. My script starts with ~20MB mem being used, and after using Tie::File and performing your steps above for about 30 minutes, the script would grow to over 500MB in RSS memory. Does anyone know if Tie::File is leaky?