in reply to ActivePerl MIME::Base64 bug?

My guess is, that one of your filehandles is not in binmode. Try if this makes a difference:
use MIME::Base64; use Fatal qw/open/; my ( $buffer, $file_data ); open my $reader, '<:bytes', "TEST.gif"; while ( read( $reader, $buffer, 10 * 57 ) ) { $file_data .= decode_base64( encode_base64( $buffer, '' ) ); } open my $writer, '>:bytes', "TEST_base64.gif"; print $writer $file_data;
Boris

Replies are listed 'Best First'.
Re^2: ActivePerl MIME::Base64 bug?
by ikegami (Patriarch) on Apr 17, 2006 at 22:13 UTC
    :bytes has nothing to do with line endings, :raw does. See PerlIO.