well ... i think perl is quite huge for this problem. I'll use openssl
as temporary hack.
alias B64enc='openssl base64'
alias B64dec='openssl base64 -d'
thanks for help.
regards.
------------
I've been using the stand-alone:
http://www.fourmilab.ch/webtools/base64/
I never realised I already had it in openssl.
Thanks for the tip.

This led me to see what else I might already have or could get in a ready
made package rather than having to use a source.
(I do need this util in some form on every box and previously all my boxes
were SCO OpenServer and I had been using the fourmilab source for years.)

Then I decided to run a few simple time tests, since this gets used a lot in
various system() commands in application code and cgi scripts etc...

I expected the simple plain base64 util to be the fastest but I was wrong:

In each case I repeated the same command many times and always got almost
exactly the same results, that is, +- 0m0.004 of the numbers shown so these
are representative not just a fluke or caching effects or effects of the os
being busy elsewhere.

So even though I have the dedicated util it's actually better to use
openssl.

As a side benefit, thats one less special thing to maintain on all my boxes.

On a related note. I had/have a need for a standalone url encoder/decoder
and made one myself, then receive the help of someone else to make it into a
proper util with man page and getopts() and basic sanity checking etc... The
source is here. I never bothered to make linux binaries except for myself
yet but it's such basic code it builds with no problems anywhere.