MIME::Decoder::UU

S

S Etchelecu

I'm having trouble understanding the MIME::Decoder usage.

Within the context of a MIME email handling program I have an array, @data,
and I want to uuencode it. I thought I could instantiate a MIME::Decoder
with an encoding of 'x-uuencode' and then call the encode method as,

my $decoder = new MIME::Decoder('x-uuencode');
$decoder->encode(@data, @uudata);

However, the encode method only accepts STREAMs as arguments. Obviously I
could write out the array data to a temporary file, close it, open it for
input, open another temporary output file, call encode with the two
temporary files, close the temporary output file, open it for input, read it
into the uuencoded array, and then clean up the two temporary files.

I'm hoping there is a better way and that someone might share other
approaches with me.

Thanks,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top