Mercurial > hg > Game > Cerium
annotate bin/get_xml_image.pl @ 1872:a1bfda09128a draft
add IO threads in CpuThreads
author | masa |
---|---|
date | Fri, 27 Dec 2013 20:58:30 +0900 |
parents | 3e1caef39798 |
children |
rev | line source |
---|---|
1093 | 1 #!/usr/bin/perl |
2 | |
3 use MIME::Base64; | |
4 my $image; | |
5 my $buf; | |
6 | |
7 while(<>) { | |
8 if (/<image name="(.*)">/) { | |
9 $image= $1; | |
10 $buf = ''; | |
11 } elsif (/<\/image>/ ) { | |
12 open(OUT, ">/tmp/$image") ; | |
13 print OUT decode_base64($buf); | |
14 $image = ''; | |
15 } elsif ($image) { | |
16 $buf .= $_; | |
17 } | |
18 } |