If you are really searching for a uniqe filename, you should quite propably add
$$ (the process-ID) to it, to be on the save side. So you can have multiple programs running at the same time that do not interfere:
$file = time()."-$$.tmp";
HTH!
--
use signature;
signature(" So long\nAlfie");