﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-把蛋糕做大-随笔分类-perl</title><link>http://www.blogjava.net/shonhen/category/13062.html</link><description>大家都有蛋糕吃</description><language>zh-cn</language><lastBuildDate>Thu, 01 Mar 2007 14:15:11 GMT</lastBuildDate><pubDate>Thu, 01 Mar 2007 14:15:11 GMT</pubDate><ttl>60</ttl><item><title>Shell下转换文件编码,从GB2312到UTF-8</title><link>http://www.blogjava.net/shonhen/archive/2006/08/01/61110.html</link><dc:creator>理想</dc:creator><author>理想</author><pubDate>Mon, 31 Jul 2006 17:20:00 GMT</pubDate><guid>http://www.blogjava.net/shonhen/archive/2006/08/01/61110.html</guid><wfw:comment>http://www.blogjava.net/shonhen/comments/61110.html</wfw:comment><comments>http://www.blogjava.net/shonhen/archive/2006/08/01/61110.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shonhen/comments/commentRss/61110.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shonhen/services/trackbacks/61110.html</trackback:ping><description><![CDATA[
		<code>
		</code>
		<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;">
				<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
				<span style="color: rgb(0, 0, 0);">perl </span>
				<span style="color: rgb(0, 0, 0);">-</span>
				<span style="color: rgb(0, 0, 0);">MEncode </span>
				<span style="color: rgb(0, 0, 0);">-</span>
				<span style="color: rgb(0, 0, 0);">pi </span>
				<span style="color: rgb(0, 0, 0);">-</span>
				<span style="color: rgb(0, 0, 0);">e </span>
				<span style="color: rgb(0, 0, 0); font-weight: bold;">'</span>
				<span style="color: rgb(0, 0, 0); font-weight: bold;">$_=encode_utf8(decode(gb2312=&gt;$_))</span>
				<span style="color: rgb(0, 0, 0); font-weight: bold;">'</span>
				<span style="color: rgb(0, 0, 0);"> filename<br /></span>
		</div>
		<br />转换目录下所有文件<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> f in `find </span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">`; </span><span style="color: rgb(0, 0, 255);">do</span><span style="color: rgb(0, 0, 0);"> [ </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">f </span><span style="color: rgb(128, 0, 128);">$f</span><span style="color: rgb(0, 0, 0);"> ] </span><span style="color: rgb(0, 0, 0);">&amp;&amp;</span><span style="color: rgb(0, 0, 0);"> perl </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">MEncode </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">pi </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">e </span><span style="color: rgb(0, 0, 0); font-weight: bold;">'</span><span style="color: rgb(0, 0, 0); font-weight: bold;">$_=encode_utf8(decode(gb2312=&gt;$_))</span><span style="color: rgb(0, 0, 0); font-weight: bold;">'</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$f</span><span style="color: rgb(0, 0, 0);">; done;</span></div><br /><img src ="http://www.blogjava.net/shonhen/aggbug/61110.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shonhen/" target="_blank">理想</a> 2006-08-01 01:20 <a href="http://www.blogjava.net/shonhen/archive/2006/08/01/61110.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>获取图片大小等信息</title><link>http://www.blogjava.net/shonhen/archive/2006/07/14/58200.html</link><dc:creator>理想</dc:creator><author>理想</author><pubDate>Fri, 14 Jul 2006 07:34:00 GMT</pubDate><guid>http://www.blogjava.net/shonhen/archive/2006/07/14/58200.html</guid><wfw:comment>http://www.blogjava.net/shonhen/comments/58200.html</wfw:comment><comments>http://www.blogjava.net/shonhen/archive/2006/07/14/58200.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shonhen/comments/commentRss/58200.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shonhen/services/trackbacks/58200.html</trackback:ping><description><![CDATA[
		<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;">
				<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
				<span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 255);">use</span><span style="color: rgb(0, 0, 0);"> Image</span><span style="color: rgb(0, 0, 0);">::</span><span style="color: rgb(0, 0, 0);">Magick;<br /></span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">my</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(128, 0, 128);">$width</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$height</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$size</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$format</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">my</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$image</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> Image</span><span style="color: rgb(0, 0, 0);">::</span><span style="color: rgb(0, 0, 0);">Magick</span><span style="color: rgb(0, 0, 0);">-&gt;</span><span style="color: rgb(0, 0, 0);">new;<br /></span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(128, 0, 128);">$width</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$height</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$size</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$format</span><span style="color: rgb(0, 0, 0);">) </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$image</span><span style="color: rgb(0, 0, 0);">-&gt;</span><span style="color: rgb(0, 0, 0);">Ping(</span><span style="color: rgb(0, 0, 0); font-weight: bold;">'</span><span style="color: rgb(0, 0, 0); font-weight: bold;">logo.png</span><span style="color: rgb(0, 0, 0); font-weight: bold;">'</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">5</span> <span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(128, 0, 128);">$width</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$height</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$size</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$format</span><span style="color: rgb(0, 0, 0);">) </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$image</span><span style="color: rgb(0, 0, 0);">-&gt;</span><span style="color: rgb(0, 0, 0);">Ping(file</span><span style="color: rgb(0, 0, 0);">=&gt;\*</span><span style="color: rgb(0, 0, 0);">IMAGE);<br /></span><span style="color: rgb(0, 128, 128);">6</span> <span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(128, 0, 128);">$width</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$height</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$size</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$format</span><span style="color: rgb(0, 0, 0);">) </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(128, 0, 128);">$image</span><span style="color: rgb(0, 0, 0);">-&gt;</span><span style="color: rgb(0, 0, 0);">Ping(blob</span><span style="color: rgb(0, 0, 0);">=&gt;</span><span style="color: rgb(128, 0, 128);">$blob</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);"></span><span style="color: rgb(0, 0, 0);"></span></div>
		<br />
<img src ="http://www.blogjava.net/shonhen/aggbug/58200.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shonhen/" target="_blank">理想</a> 2006-07-14 15:34 <a href="http://www.blogjava.net/shonhen/archive/2006/07/14/58200.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>