That's what I thought, but in the File::Temp documentation:
WARNING
For maximum security, endeavour always to avoid ever
looking at, touching, or even imputing the existence of
the filename. You do not know that that filename is
connected to the same file as the handle you have, and
attempts to check this can only trigger more race
conditions. It's far more secure to use the filehandle
alone and dispense with the filename altogether.