in reply to Converting To Uuencoded Format

how does the following do that in one step?

It doesn't. The comment is misleading.

It translates the characters used to represent each six bit chunk of the data. Both uuencode and Base64 encodings break the original data into chunks of six bits and use one character to represent each chunk, but they use different characters to represent each chunk.

There are other differences in the format of Base64 and uuencoded messages. They both break the encoded data up into lines with a maximum length. Uuencode prefixes each line with the number of bytes of original data encoded in the line. And both have header and footer lines. Much of the rest of the subroutine deals with breaking up the encoded data and adding the byte count prefixes.

In MIME::Base64::Perl, pack and unpack are used to translate between uuencoded data (less the header and footer lines) and the original data. It is pack (with the 'u' encoding specified) that does what you describe. And in decode_base64 unpack is used to convert from the uuencoded form (less the header and footer lines) back to the original data.