<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>银河星尘 &#187; Perl</title>
	<atom:link href="http://galaxy.ourkernel.com/blog/category/computer/soft/perl/feed" rel="self" type="application/rss+xml" />
	<link>http://galaxy.ourkernel.com/blog</link>
	<description>Galaxy's World</description>
	<lastBuildDate>Mon, 26 Jul 2010 06:58:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>[ZT]Perl Command-Line Options</title>
		<link>http://galaxy.ourkernel.com/blog/200910/681</link>
		<comments>http://galaxy.ourkernel.com/blog/200910/681#comments</comments>
		<pubDate>Wed, 21 Oct 2009 05:16:45 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ZT]]></category>

		<guid isPermaLink="false">http://galaxy.ourkernel.com/blog/200910/681</guid>
		<description><![CDATA[http://www.perl.com/lpt/a/857 Perl Command-Line Options By Dave Cross August 10, 2004 Perl has a large number of command-line options that can help to make your programs more concise and open up many new possibilities for one-off command-line scripts using Perl. In this article we&#8217;ll look at some of the most useful of these. Safety Net Options [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200910/681/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ZT]How can I find out where a Perl module is installed?</title>
		<link>http://galaxy.ourkernel.com/blog/200910/677</link>
		<comments>http://galaxy.ourkernel.com/blog/200910/677#comments</comments>
		<pubDate>Wed, 14 Oct 2009 10:28:16 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[stackoverflow]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ZT]]></category>

		<guid isPermaLink="false">http://galaxy.ourkernel.com/blog/200910/677</guid>
		<description><![CDATA[http://stackoverflow.com/questions/1557959/how-can-i-find-out-where-a-perl-module-is-installed/ How do get the path of a installed Perl module by name, e.g. Time::HiRes? I want this just because I have to run my perl script on different nodes of a SGE Grid Engine system. Sometimes, even run as other username. I can use CPAN.pm to install packages for myself, but it is not [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200910/677/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装DBIx::Threaded</title>
		<link>http://galaxy.ourkernel.com/blog/200907/610</link>
		<comments>http://galaxy.ourkernel.com/blog/200907/610#comments</comments>
		<pubDate>Sat, 25 Jul 2009 03:14:36 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Galaxy_Original]]></category>

		<guid isPermaLink="false">http://galaxy001.3322.org/blog/200907/610</guid>
		<description><![CDATA[关键：DBIX_THRD_DSN='dbi:SQLite:dbname=t.sqlite' perl -MCPAN -eshell 剩下的，就是Mystory了…… 工作需要（好大的理由……），得玩iThread了，perl -V结果： Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=linux, osvers=2.6.9-34.0.2.el, archname=x86_64-linux-thread-multi uname='linux mehak.karan.org 2.6.9-34.0.2.el #1 fri jul 7 17:58:49 cdt 2006 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -m64 -Dversion=5.8.5 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.5 [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200907/610/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PostgreSQL与标准SQL数据类型对应表</title>
		<link>http://galaxy.ourkernel.com/blog/200809/399</link>
		<comments>http://galaxy.ourkernel.com/blog/200809/399#comments</comments>
		<pubDate>Sun, 28 Sep 2008 11:11:55 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=399</guid>
		<description><![CDATA[__DATA__ ## Format: for each type, there are 6 items, space separated: ## 1. The given name, from the Postgres source code (pg_type.h) ## 2. The function name we use to do the quoting, or 0 if we do not bind it ## 3. The function name we use for DE-quoting ## 4. The closest [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200809/399/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[JS]Determining Your Visitor&#8217;s Time Zone</title>
		<link>http://galaxy.ourkernel.com/blog/200809/396</link>
		<comments>http://galaxy.ourkernel.com/blog/200809/396#comments</comments>
		<pubDate>Sat, 20 Sep 2008 01:54:28 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/2008/09/20/jsdetermining-your-visitors-time-zone/</guid>
		<description><![CDATA[http://www.willmaster.com/library/javascript/determining-your-visitors-time-zone.php Determining Your Visitor&#8217;s Time Zone You can capture your visitor&#8217;s time and time zone for your own information. And you can let your visitor know the current time on your business office clocks. But why would you want to? You can determine what time of day (their time) your visitors are most active (for [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200809/396/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Note]Perl表头处理</title>
		<link>http://galaxy.ourkernel.com/blog/200807/264</link>
		<comments>http://galaxy.ourkernel.com/blog/200807/264#comments</comments>
		<pubDate>Wed, 16 Jul 2008 15:14:48 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Stories]]></category>
		<category><![CDATA[Galaxy]]></category>
		<category><![CDATA[Note]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=264</guid>
		<description><![CDATA[http://bbs.chinaunix.net/thread-1200880-1-1.html root@lynch /cgi/ajax/&#62;mpstat Linux 2.6.18 &#40;lynch&#41; 2008年07月16日 &#160; 12时18分00秒 CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s 12时18分00秒 all 14.49 0.00 1.06 0.49 0.05 0.02 0.00 83.89 287.70 要把每一个带%的项的值取出来，比如说要取出%idle的值83.89 最开始用数组的元素来取， $array[9]; 但有的系统mpstat的输出会少一项，数组的元素就变了， 要取出%idle的值就要用$array[8]了。 现在用哈希表来取数据，将有CPU的行作为key，将有all的行作为value, 下面是代码 #!/usr/local/bin/perl use strict; use warnings; &#160; my $mpstat = '/usr/bin/mpstat'; my &#40;$hash, @keys, @values&#41;; &#160; open&#40;PIPE, &#34;$mpstat &#124;&#34;&#41; [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200807/264/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何从文件中每次读取固定数目的行</title>
		<link>http://galaxy.ourkernel.com/blog/200807/260</link>
		<comments>http://galaxy.ourkernel.com/blog/200807/260#comments</comments>
		<pubDate>Wed, 16 Jul 2008 15:06:15 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=260</guid>
		<description><![CDATA[如何从文件中每次读取固定数目的行 http://bbs.chinaunix.net/viewthread.php?tid=1213772&#38;pid=8842204&#38;page=1&#38;extra=page%3D1#pid8842204 package MyFileIO; use base 'IO::File'; sub get_n_lines { my $self = shift; my $lines = shift &#124;&#124; 1; #default for 1 line. if (wantarray) { my @t; for (1 .. $lines) { push @t, $self->getline; } return @t; } my $t; for (1 .. $lines) { $t .= $self->getline; } return $t; } [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200807/260/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样用Perl实现CLI下光标旋转</title>
		<link>http://galaxy.ourkernel.com/blog/200807/242</link>
		<comments>http://galaxy.ourkernel.com/blog/200807/242#comments</comments>
		<pubDate>Sat, 05 Jul 2008 16:02:05 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Note]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=242</guid>
		<description><![CDATA[http://bbs.chinaunix.net/thread-1187443-1-1.html 怎样用perl实现dos提示符下，让那个光标旋转的程序 #!/usr/bin/perl $&#124;++; my @c = qw! - \ &#124; / !; # my $i = 0; my $j = 0; print ". "; while (1) { select(undef, undef, undef, 0.2); print "\b", $c[$i]; $i++; $j++; print "\b. " unless ($j % 10); $i = 0 if ($i > 3); } 我把 dajun高手的代码改了一小下，这回符合我的要求了，看起来很好玩的样子，感谢大家的帮助，尤其感谢dajun！ #!/usr/bin/perl [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200807/242/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转载]正则表达式-对日期的验证</title>
		<link>http://galaxy.ourkernel.com/blog/200806/239</link>
		<comments>http://galaxy.ourkernel.com/blog/200806/239#comments</comments>
		<pubDate>Mon, 30 Jun 2008 02:21:28 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=239</guid>
		<description><![CDATA[http://www.idocbook.cn/index.php?option=com_content&#038;task=view&#038;sectionid=3&#038;catid=6&#038;id=3&#038;Itemid=7 日期正则: (^&#124;s&#124;()((([1-9]){1}&#124;([0][1-9]){1}&#124;([1][012]){1}){1}[/-]((2[0-9]){1}&#124;(3[01]){1}&#124;([01][1-9]){1}&#124;([1-9]){1}){1}[/-](((19&#124;20)([0-9][0-9]){1}&#124;([0-9][0-9]){1})){1}(([s&#124;)&#124;:])&#124;(^&#124;s&#124;()((([0-9]){1}&#124;([0][1-9]){1}&#124;([1][012]){1}){1}[/-](([11-31]){1}&#124;([01][1-9]){1}&#124;([1-9]){1}){1}[/-](((19&#124;20)([0-9][0-9]){1}&#124;([0-9][0-9]){1})){1}(([s&#124;)&#124;:&#124;$&#124;&#62;])){1}){1}){1}){1} 她允许：[01/01/2001 ], [01-01-2001:], [(1-1-01)] 她不允许：[13/1/2001], [1-32-2001], [1-1-1801] 转自：http://hi.baidu.com/lulufei/blog/item/590b894b9cf68df383025c55.html &#160; 日期正则: (^&#124;s&#124;()((([1-9]){1}&#124;([0][1-9]){1}&#124;([1][012]){1}){1}[/-]((2[0-9]){1}&#124;(3[01]){1}&#124;([01][1-9]){1}&#124;([1-9]){1}){1}[/-](((19&#124;20)([0-9][0-9]){1}&#124;([0-9][0-9]){1})){1}(([s&#124;)&#124;:])&#124;(^&#124;s&#124;()((([0-9]){1}&#124;([0][1-9]){1}&#124;([1][012]){1}){1}[/-](([11-31]){1}&#124;([01][1-9]){1}&#124;([1-9]){1}){1}[/-](((19&#124;20)([0-9][0-9]){1}&#124;([0-9][0-9]){1})){1}(([s&#124;)&#124;:&#124;$&#124;&#62;])){1}){1}){1}){1} 她允许：[01/01/2001 ], [01-01-2001:], [(1-1-01)] 她不允许：[13/1/2001], [1-32-2001], [1-1-1801] 1.验证日期的正则表达式加入闰年的判断以及思路分析 进入正题之前，我们需要澄清两个概念： 一，什么是合法的日期范围？对于不同的应用场景，这个问题有不同的解释。这里采纳MSDN中的约定： DateTime 值类型表示值范围在公元（基督纪元）0001 年 1 月 1 日午夜 12:00:00 到公元 (C.E.) 9999 年 12 月 31 日晚上 11:59:59 之间的日期和时间。 二，关于闰年的阐释。人民教育出版社小学数学室的解释浅明易懂（mediawiki等都没说明为什么整百年份必须是400的倍数时才是闰年）： 关于公历闰年是这样规定的：地球绕太阳公转一周叫做一回归年，一回归年长365日5时48分 46秒。因此，公历规定有平年和闰年，平年一年有365日，比回归年短0.2422日，四年共短0.9688日，故每四年增加一日，这一年有366日，就 是闰年。但四年增加一日比四个回归年又多0.0312日,400年后将多3.12日,故在400年中少设3个闰年,也就是在400年中只设97个闰年，这 样公历年的平均长度与回归年就相近似了。由此规定：年份是整百数的必须是400的倍数才是闰年，例如1900年、2100年就不是闰年。 &#160; 清楚了以上两个概念，我们进入正题。 首先需要验证年份，显然，年份范围为 0001 &#8211; 9999，匹配YYYY的正则表达式为： [0-9]{3}[1-9]&#124;[0-9]{2}[1-9][0-9]{1}&#124;[0-9]{1}[1-9][0-9]{2}&#124;[1-9][0-9]{3} 其中 [...]]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200806/239/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Perl Profiler</title>
		<link>http://galaxy.ourkernel.com/blog/200806/229</link>
		<comments>http://galaxy.ourkernel.com/blog/200806/229#comments</comments>
		<pubDate>Sat, 07 Jun 2008 10:09:08 +0000</pubDate>
		<dc:creator>Galaxy</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Note]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[优化]]></category>
		<category><![CDATA[速度]]></category>

		<guid isPermaLink="false">http://galaxysd.3322.org/blog/?p=229</guid>
		<description><![CDATA[Perl 带着一个调节器，Devel::DProf 模块。你可以键入下面的命令调节在 mycode.pl 里的 Perl 程序：   perl -d:DProf mycode.pl 虽然我们管它叫调节器——它的作用就是调节器，但 DProf 采用的机制和我们在本章早些时候讨论的内容完全一样。DProf 只是一个记录 Perl 进入和离开每个子过程的时间的调试器。 当你调节的脚本结束的时候，DProf 会向一个叫 tmon.out 的文件倾倒计时信息。和 Perl 一起发布的 dprofpp 程序知道如何分析 tmon.out 以及产生输出。你还可以把带 -p 开关的 dprofpp 用做整个处理过程的前端（见稍后的描述）。   way1: perl -d:DProf mycode.pl dprofpp tmon.out   way2 dprofpp -p mycode.pl   Tags: Note, Perl, Tips, 优化, 速度]]></description>
		<wfw:commentRss>http://galaxy.ourkernel.com/blog/200806/229/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
