I need to use Spreadsheet::WriteExcel to generate spreadsheets with images embedded. Spreadsheet::WriteExcel has a method, insert_image, that allows images to be inserted by specifying a path to the image. However, I need to pass a scalar containing the image data instead of a path because my images will either be loaded from a database or generated programmatically. Is there a way to make the scalar act like a path, but pass the data contained in the scalar after a call to open? Is there a different, simpler way to solve this?