in reply to Using scalars as a file data?
While opening a reference to a scalar works for things that take a filehandle, there's not a lot you can do when something wants an actual filename, except to create a file and write the contents of the scalar to it.
In the case of attachments for emails though, you might be better off using an alternative library, like MIME::Entity or MIME::Lite, which have more flexible attachment methods.
|
|---|