projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Integrate MIME::Base64 2.16 from CPAN. (Do we really want the
[p5sagit/p5-mst-13.2.git]
/
ext
/
MIME
/
Base64
/
encode-base64
1
#!/usr/bin/perl
2
3
use MIME::Base64 qw(encode_base64);
4
5
my $buf = "";
6
while (<>) {
7
$buf .= $_;
8
if (length($buf) >= 57) {
9
print encode_base64(substr($buf, 0, int(length($buf) / 57) * 57, ""));
10
}
11
}
12
13
print encode_base64($buf);