<?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; split</title>
	<atom:link href="http://liucheng.name/tag/split/feed/" rel="self" type="application/rss+xml" />
	<link>http://liucheng.name</link>
	<description>_SEO&#124;摄影&#124;WordPress&#124;博客</description>
	<lastBuildDate>Fri, 11 May 2012 10:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Perl split函数</title>
		<link>http://liucheng.name/1218/</link>
		<comments>http://liucheng.name/1218/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 05:22:56 +0000</pubDate>
		<dc:creator>柳城</dc:creator>
				<category><![CDATA[Biocompute]]></category>
		<category><![CDATA[explode]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[split]]></category>

		<guid isPermaLink="false">http://liucheng.name/?p=1218</guid>
		<description><![CDATA[Perl split函数扫描字符串中EXPR给出的分隔符，并把该字符串劈成一个子字符串列表。简单地意思就是把字符串，按照PATTERN里的分隔符来分隔，返回一个数组。Perl split函数相当于PHP的explode函数。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Perl chdir函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1101%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chdir函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl chr函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1153%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chr函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl chomp函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1113%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chomp函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl abs函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F998%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl abs函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl处理Fasta序列的又一实例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1205%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl处理Fasta序列的又一实例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>学习<span class='wp_keywordlink_affiliate'><a href="http://liucheng.name/tag/perl/" title="Perl" target="_blank">Perl</a></span>语言编程中……</p>
<h3>介绍:</h3>
<p><strong><span class='wp_keywordlink_affiliate'><a href="http://liucheng.name/tag/split/" title="查看 split 中的全部文章" target="_blank">split</a></span> /PATTERN/, EXPR</strong><br />
<strong>split /PATTERN/</strong><br />
<strong>split</strong></p>
<p><strong></strong>Perl split函数扫描字符串中EXPR给出的分隔符，并把该字符串劈成一个子字符串列表。简单地意思就是把字符串，按照/PATTERN/里的分隔符来分隔，返回一个数组。/PATTERN/可以是分隔符（逗号空格等），也可以是正则表达式。<span id="more-1218"></span></p>
<p>如果后面指定LIMIT，如：</p>
<p><strong>split /PATTERN/, EXPR, LIMIT</strong></p>
<p>LIMIT参数只分裂字符串的一部分。Perl split函数相当于PHP的<span class='wp_keywordlink_affiliate'><a href="http://liucheng.name/tag/explode/" title="查看 explode 中的全部文章" target="_blank">explode</a></span>函数。</p>
<h3>例子Example</h3>
<p><em><strong>例如试试下面的例子：</strong></em></p>
<pre>#!/usr/bin/<span class='wp_keywordlink_affiliate'><a href="http://liucheng.name/tag/perl/" title="perl">perl</a></span> -w

@fields = split(/:/, "1:2:3:4:5");
print "Field values are: @fields\n";

#It will produce following result:
#Field values are: 1 2 3 4 5</pre>
<p>Perl split函数是非常常用的一个函数。</p>
<p><em><strong>一个更加酷的例子如下：</strong></em>把字符串分割为独立的字符。</p>
<pre>#!/usr/bin/<span class='wp_keywordlink_affiliate'><a href="http://liucheng.name/tag/perl/" title="查看 perl 中的全部文章" target="_blank">perl</a></span> -w

print join ':', split / */, 'hi there';

#result:
#h:i:t:h:e:r:e</pre>
<p>Perl split函数完。</p>
<div class="similarity"><h3>有点相关的文章</h3><ul><li><a href="http://liucheng.name/477/">如何用perl处理测序文件</a> (1.000)</li><li><a href="http://liucheng.name/496/">perl常用的内置特殊变量</a> (1.000)</li><li><a href="http://liucheng.name/497/">perl:使用system函数</a> (1.000)</li><li><a href="http://liucheng.name/786/">用Perl下载NCBI的Blast库（Blastdb）</a> (1.000)</li><li><a href="http://liucheng.name/849/">用Perl创建UTF-8的文件</a> (1.000)</li><li><a href="http://liucheng.name/524/">PHP中文件读写操作</a> (RANDOM - 0.500)</li></ul></div><!-- Mix --><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Perl chdir函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1101%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chdir函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl chr函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1153%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chr函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl chomp函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1113%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl chomp函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl abs函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F998%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl abs函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Perl处理Fasta序列的又一实例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fliucheng.name%2F1205%2F&from=http%3A%2F%2Fliucheng.name%2F1218%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Perl处理Fasta序列的又一实例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://liucheng.name/1218/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>

