嗨我正在使用Perl腳本將Big xml分割爲小塊。我已經審閱此鏈接 Split file by XML tag使用perl腳本分割xml文件
,我的代碼是這樣的
if($line =~ /^</row>/)
{
$count++;
}
但即時得到這個錯誤
works\filesplit.pl line 20.
Bareword found where operator expected at E:\Work\perl works\filesplit.pl line 2
0, near "/^</row"
(Missing operator before row?)
syntax error at E:\Work\perl works\filesplit.pl line 20, near "/^</row"
Search pattern not terminated at E:\Work\perl works\filesplit.pl line 20.
誰能幫我
更新
<row>
<date></date>
<ForeignpostingId />
<country>11</country>
<domain>http://www.xxxx.com</domain>
<domainid>20813</domainid>
</row>
<row>
<date></date>
<ForeignpostingId />
<country>11</country>
<domain>http://www.xxxx.com</domain>
<domainid>20813</domainid>
</row>
<row>
<date></date>
<ForeignpostingId />
<country>11</country>
<domain>http://www.xxxx.com</domain>
<domainid>20813</domainid>
</row>
你想如何分割這個文件,你想用這些塊做什麼? – Kenosis
@Kenosis ...「Five」 ........
將在單個文件中被分塊 –
Backtrack
@Kenosis ..其實我的文件太大了所以我希望它被分塊5 ..
in單個文件... ...
....
這樣的 –
Backtrack