in reply to Use time() to create unique ID

You can use File::CounterFile or roll your own. A persistant counter can give you unique IDs even if your code is looping so tight that time::hires gives the same value.

-Waswas