[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



                                                                                                                             
use MIME::Base64;
use Fcntl;
use strict;

die "base64.pl <filename>\n" unless $ARGV[0];
sysopen FILE, $ARGV[0], O_RDONLY or die "$!\n";
my $buffer = "";
my $n = 0;
my $data = "";
while(($n = sysread(FILE, $buffer, 1024)) > 0) {
        $data += $buffer;
}
                                                                                                                             
print MIME::Base64::encode($data, "");



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00526" href="msg00526.html">[ale] Base64 encoding in Perl</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00523.html">[ale] Re: speedfactory dsl router setup</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00525.html">[ale] Re: speedfactory dsl router setup</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00865.html">[ale] RE: speedfactory dsl router setup</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00526.html">[ale] Base64 encoding in Perl</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00524"><strong>Date</strong></a></li>
<li><a href="threads.html#00524"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>