in reply to CUPS Printing - Using a Variable as a Filename

->printFile is documented to take a file name. You give it a file handle, which is not the same, and thus won't work.

You will have to create a named file, write your data to it and then print it via CUPS, as I don't see any approach to print from memory using Net::CUPS.