Skip to content

Instantly share code, notes, and snippets.

@s-aska s-aska/base64.pl
Created Mar 28, 2011

Embed
What would you like to do?
base64
#!/usr/bin/env perl
use strict;
use MIME::Base64;
my $base64 = encode_base64(join('', <>));
$base64=~s|\s*||g;
print $base64, "\n";
# base64
# ~/bin/base64.pl ~/Downloads/button-only.gif
# HTML
# <img src="data:image/gif;base64,XXXXXXXXXX">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.