annotate bin/get_xml_image.pl @ 1876:5e17ab506299
draft
change CPU_TYPE SPE_ANY to IO/0 ( cannot running )
author |
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
date |
Mon, 30 Dec 2013 20:52:21 +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 }
|