use MIME::Base64; unless(defined($ARGV[0])){ print <<'END'; Usage: perl im2b64.pl one.gif two.gif etc... Output is bin2b64.txt Use example of result: $c->Photo('image',-data=>$im_encode,format=>'gif'); END exit; } $c = 0; foreach(@ARGV){ open(K, $_) or die "$!"; binmode(K); foreach(<K>){ $data_im .= $_; } $im_encode = encode_base64($data_im); chop($im_encode); $ARGV[$c] =~ s/\./_/g; $done{$ARGV[$c]} = $im_encode; undef($data_im); $c++; close(K); } $sep = '-' x 35; open(K,">>$ARGV[0].txt") || die "$!"; foreach $key (keys(%done)){ print K "\x24$key = \n\"$done{$key}\\n\\n\"\;\n\n"; print K "$sep\n\n"; } close(K);
In reply to Re: Perl Tk Icons
by didier
in thread Perl Tk Icons
by senik148
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |