in reply to How to upload a data file in base64Binary format?

base64Binary seems like a contradictory term to me. Maybe they want a base64encoded binary?
#!/usr/bin/perl use strict; use MIME::Base64 qw( encode_base64 ); # provide 2 filenames as args on the commandline # first the binary, second the encoded file #encode open INFILE, '<', $ARGV[0]; binmode INFILE; open OUTFILE, '>', $ARGV[1]; my $buf; while ( read( INFILE, $buf, 4096 ) ) { print OUTFILE encode_base64($buf); } close OUTFILE; close INFILE; ################################################### #decode_base64.pl: #!/usr/bin/perl use strict; use MIME::Base64 qw( decode_base64 ); open INFILE, '<', $ARGV[0]; open OUTFILE, '>', $ARGV[1]; binmode OUTFILE; my $buf; while ( $buf = <INFILE> ) { print OUTFILE decode_base64($buf); } close OUTFILE; close INFILE;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum