in reply to Re: CUPS Printing - Using a Variable as a Filename
in thread CUPS Printing - Using a Variable as a Filename

possibly after setting $ENV{TMPDIR} to something like /dev/shm depending on the OS

Note that File::Temp supports a DIR parameter to create the temporary files in specific locations.