473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MIME::Decoder::UU

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
Jul 19 '05 #1
0 3322

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.