﻿<?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>C++博客-糯米-随笔分类-Perl</title><link>http://www.cppblog.com/varg-vikernes/category/17625.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 26 Aug 2011 14:26:01 GMT</lastBuildDate><pubDate>Fri, 26 Aug 2011 14:26:01 GMT</pubDate><ttl>60</ttl><item><title>perl 常用函数</title><link>http://www.cppblog.com/varg-vikernes/archive/2011/08/26/154445.html</link><dc:creator>糯米</dc:creator><author>糯米</author><pubDate>Fri, 26 Aug 2011 10:25:00 GMT</pubDate><guid>http://www.cppblog.com/varg-vikernes/archive/2011/08/26/154445.html</guid><wfw:comment>http://www.cppblog.com/varg-vikernes/comments/154445.html</wfw:comment><comments>http://www.cppblog.com/varg-vikernes/archive/2011/08/26/154445.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/varg-vikernes/comments/commentRss/154445.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/varg-vikernes/services/trackbacks/154445.html</trackback:ping><description><![CDATA[<div style='font-family:monospace'>
</br>
摘自 perldoc.perl.org</br>
</br>
<strong>map BLOCK LIST</strong></br>
<strong>map EXPR, LIST</strong></br>
对于 LIST 里的每一个元素按照 BLOCK 或者 EXPR 里的操作进行求值。</br>
返回求值结果组成的数组。</br>
如果返回值是 scalar 类型，则返回结果数组的大小。</br>
例子：</br>
返回一组数字对应的字符</br>
<pre style='background-color: #e0e0e0'>
@chars = map(chr, @numbers);
</pre>
返回一组数字的平方</br>
<pre style='background-color: #e0e0e0'>
my @squares = map { $_ &gt; 5 ? ($_ * $_) : () } @numbers;
</pre>
返回大于5的数字的平方</br>
<pre style='background-color: #e0e0e0'>
my @squares = map { $_ &gt; 5 ? ($_ * $_) : () } @numbers;
</pre>
由于 map 总是返回一个列表，因此可以赋值给哈希类型的变量：</br>
<pre style='background-color: #e0e0e0'>
%hash = map { get_a_key_for($_) =&gt; $_ } @array;
</pre>
也可以这样写：</br>
<pre style='background-color: #e0e0e0'>
%hash = ();
foreach (@array) {
    $hash{get_a_key_for($_)} = $_;
}
</pre>
</br>
<strong>-X FILEHANDLE</strong></br>
文件测试函数：</br>
<pre style='background-color: #e0e0e0'>
-r  File is readable by effective uid/gid.
-w  File is writable by effective uid/gid.
-x  File is executable by effective uid/gid.
-o  File is owned by effective uid.
-R  File is readable by real uid/gid.
-W  File is writable by real uid/gid.
-X  File is executable by real uid/gid.
-O  File is owned by real uid.
-e  File exists.
-z  File has zero size (is empty).
-s  File has nonzero size (returns size in bytes).
-f  File is a plain file.
-d  File is a directory.
-l  File is a symbolic link.
-p  File is a named pipe (FIFO), or Filehandle is a pipe.
-S  File is a socket.
-b  File is a block special file.
-c  File is a character special file.
-t  Filehandle is opened to a tty.
-u  File has setuid bit set.
-g  File has setgid bit set.
-k  File has sticky bit set.
-T  File is an ASCII text file (heuristic guess).
-B  File is a "binary" file (opposite of -T).
-M  Script start time minus file modification time, in days.
-A  Same for access time.
-C  Same for inode change time (Unix, may differ for other platforms)
</pre>
</br>
<strong>delete EXPR</strong></br>
EXPR 为哈希变量的 slice 或者是单个元素。</br>
返回值为删除掉元素的值，可以是列表。</br>
如果返回值被要求为 scalar 类型，则返回被删除的最后一个值。</br>
delete 也可以用于数组类型的变量，不过它的行为可能不是你所预想的那样。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
%hash = (foo =&gt; 11, bar =&gt; 22, baz =&gt; 33);
$scalar = delete $hash{foo};             # $scalar is 11
$scalar = delete @hash{qw(foo bar)};     # $scalar is 22
@array  = delete @hash{qw(foo bar baz)}; # @array  is (undef,undef,33)
</pre>
</br>
<strong>each HASH</strong></br>
<strong>each ARRAY</strong></br>
<strong>each EXPR</strong></br>
返回哈希的每个 (key, value) 所组成的数组。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
while (($key, $value) = each %hash) {
    print $key, "\n";
    delete $hash{$key};   # This is safe
}
</pre>
</br>
<strong>eof FILEHANDLE</strong></br>
<strong>eof ()</strong></br>
<strong>eof</strong></br>
注意 eof() 与 eof 的区别：</br>
eof()：如果到达了 &lt;&gt; 的最后一个文件的末尾，则返回1</br>
eof：如果到达了当前文件的末尾，则返回1</br>
<pre style='background-color: #e0e0e0'>
# reset line numbering on each input file
while (&lt;&gt;) {
    next if /^\s*#/;  # skip comments
    print "$.\t$_";
} continue {
    close ARGV if eof;  # Not eof()!
}
# insert dashes just before last line of last file
while (&lt;&gt;) {
    if (eof()) {  # check for end of last file
        print "--------------\n";
    }
    print;
    last if eof();          # needed if we're reading from a terminal
}
</pre>
</br>
</br>
</div>
<img src ="http://www.cppblog.com/varg-vikernes/aggbug/154445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/varg-vikernes/" target="_blank">糯米</a> 2011-08-26 18:25 <a href="http://www.cppblog.com/varg-vikernes/archive/2011/08/26/154445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>perl 特殊变量</title><link>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154260.html</link><dc:creator>糯米</dc:creator><author>糯米</author><pubDate>Wed, 24 Aug 2011 15:45:00 GMT</pubDate><guid>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154260.html</guid><wfw:comment>http://www.cppblog.com/varg-vikernes/comments/154260.html</wfw:comment><comments>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154260.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/varg-vikernes/comments/commentRss/154260.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/varg-vikernes/services/trackbacks/154260.html</trackback:ping><description><![CDATA[<div style='font-family:monospace'>
翻译自：perldoc.perl.org</br>
</br>
<strong>== 常用变量 ==</strong></br>
</br>
<strong>$ARG</strong></br>
<strong>$_</strong></br>
默认模式搜索变量</br>
下列函数使用它作为默认参数：</br>
abs, alarm, chomp, chop, chr, chroot, cos, defined, eval, exp, glob, hex, int, lc, lcfirst, </br>
length, log, lstat, mkdir, oct, ord, pos, print, quotemeta, readlink, readpipe, ref, require,</br>
reverse (in scalar context only), rmdir, sin, split (on its second argument), sqrt, stat, </br>
study, uc, ucfirst, unlink, unpack.</br>
用于文件测试 (-f, -d)</br>
用于模式匹配操作 m//, s/// 和 tr// (又名 y///)</br>
用于 foreach, grep, map</br>
用于 given 语句</br>
</br>
<strong>@ARG </strong></br>
<strong>@_</strong></br>
对于函数来说，@_ 包含了传递给该函数的参数。在函数中，@_ 是 push, pop, shift, unshift 的默认参数。</br>
</br>
<strong>$LIST_SEPARATOR</strong></br>
<strong>$"</strong></br>
当一个数组被引用在 "" 中或者 // 中。数组的值变为所有元素被 $" 连接起来的值。</br>
$" 默认值为空格。</br>
<pre style='background-color: #e0e0e0'>
print "The array is: @array\n";
print "The array is: " . join($", @array) . "\n";
</pre>
它们是相等的。</br>
<pre style='background-color: #e0e0e0'>
@a = (1, 3, 4);
print "@a\n";
$" = ",";
print "@a\n";
print "1,3,4" =~ /@a/;
</pre>
输出为</br>
<pre style='background-color: #e0e0e0'>
1 3 4
1,3,4
1
</pre>
</br>
<strong>$PROCESS_ID</strong></br>
<strong>$PID</strong></br>
<strong>$$</strong></br>
运行 perl 脚本的当前进程的 pid 值。等同于 getpid()。</br>
</br>
<strong>$REAL_GROUP_ID</strong></br>
<strong>$GID</strong></br>
<strong>$(</strong></br>
该进程的 real gid 。由 getgid() 获得。</br>
如果运行在一个支持用户同时属于多个组的操作系统上，$( 将返回由空格分隔的多个 gid。由 getgroups() 获得。</br>
只能给 $( 赋予单个整数。</br>
</br>
<strong>$EFFECTIVE_GROUP_ID</strong></br>
<strong>$EGID</strong></br>
<strong>$)</strong></br>
该进程的 effective gid。</br>
<pre style='background-color: #e0e0e0'>
$&lt; = $&gt;;            # set real to effective uid
($&lt;,$&gt;) = ($&gt;,$&lt;);  # swap real and effective uids
</pre>
</br>
<strong>$PROGRAM_NAME</strong></br>
<strong>$0</strong></br>
当前程序的名字。</br>
</br>
<strong>$SUBSCRIPT_SEPARATOR</strong></br>
<strong>$SUBSEP</strong></br>
<strong>$;</strong></br>
如果这样访问一个哈系表：</br>
<pre style='background-color: #e0e0e0'>
$foo{$a,$b,$c}
</pre>
等同于：</br>
<pre style='background-color: #e0e0e0'>
$foo{join($;, $a, $b, $c)}
</pre>
例子：</br>
<pre style='background-color: #e0e0e0'>
%h = ('123', 'test');
$; = '';
print $h{1,2,3}; # 输出 test
</pre>
</br>
<strong>%ENV</strong></br>
存放环境变量哈希表。</br>
</br>
<strong>@F</strong></br>
当指定了 -a 参数的时候，@F 中保存着每一行被分隔后的数组：</br>
<pre style='background-color: #e0e0e0'>
perl -ane 'print pop(@F), "\n";'
</pre>
等同于</br>
<pre style='background-color: #e0e0e0'>
while (&lt;&gt;) {
    @F = split(' ');
    print pop(@F), "\n";
}
</pre>
</br>
<strong>$OSNAME</strong></br>
<strong>$^O</strong></br>
当前操作系统的名字。</br>
<pre style='background-color: #e0e0e0'>
# perl -e "print $^O"
# linux
</pre>
</br>
<strong>%SIG</strong></br>
哈希 %SIG 中保存了信号的处理函数。例子如下：</br>
<pre style='background-color: #e0e0e0'>
sub handler {   # 1st argument is signal name
    my($sig) = @_;
    print "Caught a SIG$sig--shutting down\n";
    close(LOG);
    exit(0);
    }
$SIG{'INT'}  = \&handler;
$SIG{'QUIT'} = \&handler;
...
$SIG{'INT'}  = 'DEFAULT';   # restore default action
$SIG{'QUIT'} = 'IGNORE';    # ignore SIGQUIT
</pre>
赋值为 'IGNORE' 则忽略该信号，除了 CHLD 信号。</br>
下面是指定处理函数的其他方式：</br>
<pre style='background-color: #e0e0e0'>
$SIG{"PIPE"} = "Plumber";   # 指定为 main::Plumber (不推荐)
$SIG{"PIPE"} = \&Plumber;   # 推荐的方式
$SIG{"PIPE"} = *Plumber;    # 有点奇怪
$SIG{"PIPE"} = Plumber();   # 错误的做法，Plumber() 会返回什么？？
</pre>
部分内部的 hook 也可以通过设置 SIG 来指定。比如说：</br>
<pre style='background-color: #e0e0e0'>
local $SIG{__WARN__} = sub { die $_[0] };
eval $proggie;
</pre>
当一个 warning 被抛出的时候，$SIG{__WARN__} 所指向的函数将被调用。</br>
warning 消息的内容为函数的第一个参数。</br>
</br>
<strong>$BASETIME</strong></br>
<strong>$^T</strong></br>
程序开始运行的时间(时间戳)</br>
<pre style='background-color: #e0e0e0'>
# perl -e "print $^T"
1314234806
</pre>
</br>
<strong>$PERL_VERSION</strong></br>
<strong>$^V</strong></br>
perl 的版本号</br>
<pre style='background-color: #e0e0e0'>
warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1
</pre>
</br>
<strong>== 和正则表达式相关的变量 ==</strong></br>
</br>
<strong>$&lt;digits&gt; ($1, $2, ...)</strong></br>
匹配中 () 匹配的部分。</br>
</br>
<strong>$&</strong></br>
<strong>$MATCH</strong></br>
前一次成功匹配的字符串。</br>
</br>
<strong>$`</strong></br>
<strong>$PREMATCH</strong></br>
位于前一次成功匹配字符串前面的字符串。</br>
</br>
<strong>$'</strong></br>
<strong>$POSTMATCH</strong></br>
位于前一次成功匹配字符串后面的字符串。</br>
</br>
<pre style='background-color: #e0e0e0'>
local $_ = 'abcdefghi';
/def/;
print "$`:$&:$'\n";      # 输出 abc:def:ghi
</pre>
</br>
<strong>$LAST_PAREN_MATCH</strong></br>
<strong>$+</strong></br>
前一次成功匹配中最后一个 () 中的内容。</br>
<pre style='background-color: #e0e0e0'>
/Version: (.*)|Revision: (.*)/ && ($rev = $+);
</pre>
</br>
<strong>@LAST_MATCH_END</strong></br>
<strong>@+</strong></br>
前一次成功匹配中每个 () 匹配的偏移量。</br>
$+[0] 为整个匹配末尾的偏移量</br>
$+[1] 为 $1 末尾的偏移量</br>
$+[2] 为 $2 末尾的偏移量</br>
...</br>
$#+ 为前一次成功匹配的 () 数量</br>
</br>
<strong>%LAST_PAREN_MATCH</strong></br>
<strong>%+</strong></br>
前一次成功匹配中命名匹配（即为 (?&lt;name&gt;...) 的形式）的哈系表。</br>
如：</br>
<pre style='background-color: #e0e0e0'>
'foo' =~ /(?&lt;foo&gt;foo)/; # $+{foo} 和 $1 中都存放着 'foo'
</pre>
</br>
另外一个例子：</br>
<pre style='background-color: #e0e0e0'>
$_ = "testing1234end";
/^testing(.)(.)(..)end/;
print "@+"; # 输出 14 8 9 11
/^(?&lt;foo&gt;[a-z]+)(?&lt;num&gt;\d+)/;
print "$+{foo}"; # 输出 testing
print "$+{num}"; # 输出 1234
</pre>
</br>
<strong>@LAST_MATCH_START</strong></br>
<strong>@-</strong></br>
和 @+ 类似：</br>
$-[0] 为整个匹配头部的偏移量</br>
$-[1] 为 $1 头部的偏移量</br>
$-[2] 为 $2 头部的偏移量</br>
...</br>
$` 等同于 substr($var, 0, $-[0])</br>
$& 等同于 substr($var, $-[0], $+[0] - $-[0])</br>
$' 等同于 substr($var, $+[0])</br>
$1 等同于 substr($var, $-[1], $+[1] - $-[1])</br>
$2 等同于 substr($var, $-[2], $+[2] - $-[2])</br>
$3 等同于 substr($var, $-[3], $+[3] - $-[3])</br>
</br>
<strong>%LAST_MATCH_START</strong></br>
<strong>%-</strong></br>
类似于 %+，通过 %- 可以访问到上一次成功匹配中所有的命名匹配。</br>
每个命名匹配的名字都与一个数组相关联。</br>
比如说：</br>
<pre style='background-color: #e0e0e0'>
if ('1234' =~ /(?&lt;A&gt;1)(?&lt;B&gt;2)(?&lt;A&gt;3)(?&lt;B&gt;4)/) {
    foreach my $bufname (sort keys %-) {
        my $ary = $-{$bufname};
        foreach my $idx (0..$#$ary) {
            print "\$-{$bufname}[$idx] : ",
                  (defined($ary-&gt;[$idx]) ? "'$ary-&gt;[$idx]'" : "undef"),
                  "\n";
        }
    }
}
</pre>
会输出：</br>
<pre style='background-color: #e0e0e0'>
$-{A}[0] : '1'
$-{A}[1] : '3'
$-{B}[0] : '2'
$-{B}[1] : '4'
</pre>
</br>
<strong>== 和文件句柄相关的变量 ==</strong></br>
</br>
<strong>$ARGV</strong></br>
&lt;&gt; 中正在被读取的文件的名字</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
# cat c
1
2
# cat d
1
2
3
4
# cat a.pl 
while (&lt;&gt;) {
    print "$ARGV\n";
}
# perl a.pl c d
c
c
d
d
d
d
</pre>
</br>
<strong>@ARGV</strong></br>
命令行参数，$ARGV[0] 代表第一个参数（而不是程序的名字）。</br>
</br>
<strong>$OUTPUT_FIELD_SEPARATOR</strong></br>
<strong>$OFS</strong></br>
<strong>$,</strong></br>
print 函数的输出分隔符，默认值为 undef。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
print "a", "c"; # 输出 ac
$, = "|";
print "a", "c"; # 输出 a|c
</pre>
</br>
<strong>$INPUT_LINE_NUMBER</strong></br>
<strong>$NR</strong></br>
<strong>$.</strong></br>
上一次读取文件的行号。</br>
$. 在文件句柄关闭的时候重置。</br>
由于 &lt;&gt; 操作符不会关闭文件，因此在连续从 ARGV 读取文件的时候，$. 会不断增加。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
# cat a.pl
while (&lt;&gt;) {
    print "$.\n";
}
# perl a.pl c d
1
2
3
4
5
6
</pre>
其中 c d 的长度分别为 2, 4 行。</br>
</br>
<strong>$INPUT_RECORD_SEPARATOR</strong></br>
<strong>$RS</strong></br>
<strong>$/</strong></br>
类似于 awk 的 RS 变量。它决定了 perl 如何分割行。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
# cat c
1|2|3
# cat a.pl 
$/ = "|";
while (&lt;&gt;) {
    print "line:$_\n";
}
# perl a.pl c
line:1|
line:2|
line:3
</pre>
</br>
<strong>$OUTPUT_RECORD_SEPARATOR</strong></br>
<strong>$ORS</strong></br>
<strong>$\</strong></br>
print 函数输出的分隔符。默认值为 undef，如果定义了，则在 print 完所有参数后输出 $\。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
$\ = "|";
print "a";
print "b";
# 将输出 a|b|
</pre>
</br>
<strong>$OUTPUT_AUTOFLUSH</strong></br>
<strong>$|</strong></br>
如果设置为非0的值，将强制的 flush 当前 selected 的文件句柄。</br>
（类似于 setbuf(xx, NULL) ？）</br>
</br>
<strong>== 和错误信息有关的变量 ==</strong></br>
</br>
<strong>$ERRNO</strong></br>
<strong>$!</strong></br>
等同于 libc 中的 errno。可以转换为 int 和 string 两种形式：</br>
<pre style='background-color: #e0e0e0'>
open '/a';
print int($!) . ": $!\n"; # 输出 2: 没有那个文件或目录
</pre>
</br>
<strong>$CHILD_ERROR</strong></br>
<strong>$?</strong></br>
类似于 shell 中的 $?。可以为下列操作的返回值：</br>
- 最后一次管道关闭</br>
- `` 或者 system() 语句</br>
- wait() 或者 waitpid() </br>
$? &gt;&gt; 8 为子进程的返回值</br>
</br>
<strong>$EVAL_ERROR</strong></br>
<strong>$@</strong></br>
上一次 eval() 操作的语法错误信息。</br>
例子：</br>
<pre style='background-color: #e0e0e0'>
# cat a.pl
eval "my a";
print "$@";
# perl a.pl
No such class a at (eval 1) line 1, near "my a"
syntax error at (eval 1) line 2, at EOF
</pre>
</br>
</div>
<img src ="http://www.cppblog.com/varg-vikernes/aggbug/154260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/varg-vikernes/" target="_blank">糯米</a> 2011-08-24 23:45 <a href="http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>perl 范围操作符</title><link>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154222.html</link><dc:creator>糯米</dc:creator><author>糯米</author><pubDate>Wed, 24 Aug 2011 09:00:00 GMT</pubDate><guid>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154222.html</guid><wfw:comment>http://www.cppblog.com/varg-vikernes/comments/154222.html</wfw:comment><comments>http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154222.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/varg-vikernes/comments/commentRss/154222.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/varg-vikernes/services/trackbacks/154222.html</trackback:ping><description><![CDATA[<div style="font-family:monospace">
摘自：perldoc.perl.org<br />
<br />
当".."操作符返回bool型变量的时候，有如下几个例子：<br />
<pre style="background-color: #e0e0e0">while (&lt;&gt;) {
    print if (2 .. 6);
}
</pre>
将会打印文件的 2 ~ 6 行。<br />
<br />
同样的：<br />
<pre style="background-color: #e0e0e0">next if (1 .. /^$/); # 跳过前面的空白行
s/^/&gt; / if (/^$/ .. eof); # 在正文前面加上 &gt; 
</pre>
<br />
还可以这样使用：<br />
<pre style="background-color: #e0e0e0"># parse mail messages
while (&lt;&gt;) {
    $in_header =   1  .. /^$/;
    $in_body   = /^$/ .. eof;
    if ($in_header) {
        # do something
    } else { # in body
        # do something else
    }
} 
</pre>
<br />
下面的例子展示了".."和"..."的区别：<br />
<pre style="background-color: #e0e0e0">@lines = ("   - Foo",
          "01 - Bar",
          "1  - Baz",
          "   - Quux");
foreach (@lines) {
    if (/0/ .. /1/) {
        print "$_\n";
    }
}
</pre>
这个程序只输出Bar那行。如果将".."换成"..."，则还会输出Baz那行。<br />
<br />
下面展示".."操作符返回列表型变量时候的几个例子：<br />
<pre style="background-color: #e0e0e0">for (101 .. 200) { print; }    # print $_ 100 times
@foo = @foo[0 .. $#foo];    # an expensive no-op
@foo = @foo[$#foo-4 .. $#foo];    # slice last 5 items
</pre>
<br />
同样可以用于字符串：<br />
<pre style="background-color: #e0e0e0">@alphabet = ("A" .. "Z");
$hexdigit = (0 .. 9, "a" .. "f")[$num &amp; 15];
@z2 = ("01" .. "31");  print $z2[$mday];
</pre>
<br />
还可以用于单个字符：<br />
<pre style="background-color: #e0e0e0">use charnames "greek";
my @greek_small =  ("\N{alpha}" .. "\N{omega}");
</pre>
<br />
<pre style="background-color: #e0e0e0">use charnames "greek";
my @greek_small =  map { chr } ord "\N{alpha}" .. ord "\N{omega}";
</pre>
<br />
</div><img src ="http://www.cppblog.com/varg-vikernes/aggbug/154222.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/varg-vikernes/" target="_blank">糯米</a> 2011-08-24 17:00 <a href="http://www.cppblog.com/varg-vikernes/archive/2011/08/24/154222.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>