That horse was already bothered and I had already used the binary FH c +all and got the same results. But I think I have pinpointed the exact location of the problem: it's +in the encode_base64 code itself - on the last few lines: sub encode_base64 ($) { my $res = ""; my $eol = "\n"; pos($_[0]) = 0; while ($_[0] =~ /(.{1,45})/gs) { $res .= substr(pack("u", $1), 1); chop($res); } $res =~ tr|` -_|AA-Za-z0-9+/|; #!!! Here's where the different characters are created!!!! # my $padding = (3 - length($_[0]) % 3) % 3; # $res =~ s/.{$padding}$/"=" x $padding/e if $padding; # if (length $eol) { # $res =~ s/(.{1,76})/$1$eol/g; # } $res; } I have borrowed this code and don't know what it's trying to do - is i +t a standard? Since I have no MIME access on my host, and I'm using U +NIX - is it possible another encoding function exists, something like + uu?encode? Thanks again. Peter.

In reply to Re: Re: Question about Binary files by Anonymous Monk
in thread Question about Binary files by zzzeno

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.