#!/usr/bin/perl -w require "$ENV{'HOME'}/bin/base64.pl"; # uhem, this should be a multiple of 45 !!! $read_length = 45 * 128; $binary_data = ""; while (read(STDIN, $binary_data, $read_length) != 0) { print(&base64'b64encode($binary_data)); }