More the the point,
File::Temp has a function (as
Zaxo alludes to) that can generate names
without creating an actual file. (The function in question is
tmpnam.)
Note, however, that uniqueness is not absolutely guaranteed, although it does to a very good job.