myforwik has asked for the wisdom of the Perl Monks concerning the following question:
I keep running into a problem when using perl CPAN modules.
Instead of taking scalars as data input, many modules only take filenames, and then read the file content as the input data.
For example the Mail::Sender has Attach method, but you have to specify a filename, which it then reads. You can't just specify the data as scalar you already have in memory.
What is a good way to get around this? Is there a way to make a file 'in memory' that perl modules can then 'read'?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using scalars as a file data?
by Loops (Curate) on Jul 31, 2013 at 00:01 UTC | |
|
Re: Using scalars as a file data?
by runrig (Abbot) on Jul 31, 2013 at 00:20 UTC | |
|
Re: Using scalars as a file data? (tempfile)
by Anonymous Monk on Jul 31, 2013 at 00:21 UTC |